fix(install): ipython
This commit is contained in:
parent
ac26997300
commit
5b1aaedcb8
49
install
49
install
@ -25,11 +25,12 @@ declare -A TARGETS=(
|
|||||||
["arch"]=""
|
["arch"]=""
|
||||||
["psql"]=".psqlrc"
|
["psql"]=".psqlrc"
|
||||||
["docker"]=".docker/cli-plugins"
|
["docker"]=".docker/cli-plugins"
|
||||||
|
["ipython"]=".ipython/profile_default/ipython_config.py"
|
||||||
)
|
)
|
||||||
|
|
||||||
_die() {
|
_die() {
|
||||||
echo "$0: $1" >&2
|
echo "$0: $1" >&2
|
||||||
exit $2
|
exit "$2"
|
||||||
}
|
}
|
||||||
|
|
||||||
test "$0" = "./install" || _die "Error: Please, run this file from root of dotfiles, like this './install.sh TARGET" 1
|
test "$0" = "./install" || _die "Error: Please, run this file from root of dotfiles, like this './install.sh TARGET" 1
|
||||||
@ -160,13 +161,8 @@ cmd_bat() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cmd_ipython() {
|
cmd_ipython() {
|
||||||
local sub
|
_link_files_in_sandbox ${TARGETS["ipython"]}
|
||||||
sub=".ipython"
|
__install_from_sandbox
|
||||||
|
|
||||||
_die_if_installed "$HOME/$sub"
|
|
||||||
|
|
||||||
mkdir -p "$HOME/$sub/profile_default"
|
|
||||||
ln -s "$SUB/$sub/profile_default/ipython_config.py" "$HOME/$sub/profile_default/ipython_config.py"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd_font() {
|
cmd_font() {
|
||||||
@ -227,7 +223,7 @@ find_targets_that_depend_on() {
|
|||||||
local target
|
local target
|
||||||
for target in "${!TARGETS[@]}"
|
for target in "${!TARGETS[@]}"
|
||||||
do
|
do
|
||||||
if [[ " ${TARGETS["$target"]} " =~ " %$1 " ]]; then
|
if [[ " ${TARGETS["$target"]} " =~ %$1 ]]; then
|
||||||
echo "$target"
|
echo "$target"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@ -276,23 +272,24 @@ cmd_install() {
|
|||||||
do
|
do
|
||||||
SANDBOX_PATH="$(mktemp -td "${USER:=user}.dotfiles_XXXXXXX")"
|
SANDBOX_PATH="$(mktemp -td "${USER:=user}.dotfiles_XXXXXXX")"
|
||||||
case "$target" in
|
case "$target" in
|
||||||
bash) shift; cmd_bash "$@" ;;
|
bash) shift; cmd_bash "$@" ;;
|
||||||
zsh) shift; cmd_zsh "$@" ;;
|
zsh) shift; cmd_zsh "$@" ;;
|
||||||
tmux) shift; cmd_tmux "$@" ;;
|
tmux) shift; cmd_tmux "$@" ;;
|
||||||
alacritty) shift; cmd_alacritty "$@" ;;
|
alacritty) shift; cmd_alacritty "$@" ;;
|
||||||
nvim) shift; cmd_nvim "$@" ;;
|
nvim) shift; cmd_nvim "$@" ;;
|
||||||
ssh) shift; cmd_ssh "$@" ;;
|
ssh) shift; cmd_ssh "$@" ;;
|
||||||
git) shift; cmd_git "$@" ;;
|
git) shift; cmd_git "$@" ;;
|
||||||
ranger) shift; cmd_ranger "$@" ;;
|
ranger) shift; cmd_ranger "$@" ;;
|
||||||
gpg) shift; cmd_gpg "$@" ;;
|
gpg) shift; cmd_gpg "$@" ;;
|
||||||
i3) shift; cmd_i3 "$@" ;;
|
i3) shift; cmd_i3 "$@" ;;
|
||||||
bat) shift; cmd_bat "$@" ;;
|
bat) shift; cmd_bat "$@" ;;
|
||||||
font) shift; cmd_font "$@" ;;
|
font) shift; cmd_font "$@" ;;
|
||||||
termux) shift; cmd_termux "$@" ;;
|
termux) shift; cmd_termux "$@" ;;
|
||||||
arch) shift; cmd_arch "$@" ;;
|
arch) shift; cmd_arch "$@" ;;
|
||||||
psql) shift; cmd_psql "$@" ;;
|
psql) shift; cmd_psql "$@" ;;
|
||||||
docker) shift; cmd_docker "$@" ;;
|
docker) shift; cmd_docker "$@" ;;
|
||||||
*) shift; cmd_no_target "$@" ;;
|
ipython) shift; cmd_ipython "$@" ;;
|
||||||
|
*) shift; cmd_no_target "$@" ;;
|
||||||
esac
|
esac
|
||||||
rm -rf "$SANDBOX_PATH"
|
rm -rf "$SANDBOX_PATH"
|
||||||
done
|
done
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user