fix(install): ipython
This commit is contained in:
parent
ac26997300
commit
5b1aaedcb8
15
install
15
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
|
||||||
@ -292,6 +288,7 @@ cmd_install() {
|
|||||||
arch) shift; cmd_arch "$@" ;;
|
arch) shift; cmd_arch "$@" ;;
|
||||||
psql) shift; cmd_psql "$@" ;;
|
psql) shift; cmd_psql "$@" ;;
|
||||||
docker) shift; cmd_docker "$@" ;;
|
docker) shift; cmd_docker "$@" ;;
|
||||||
|
ipython) shift; cmd_ipython "$@" ;;
|
||||||
*) shift; cmd_no_target "$@" ;;
|
*) shift; cmd_no_target "$@" ;;
|
||||||
esac
|
esac
|
||||||
rm -rf "$SANDBOX_PATH"
|
rm -rf "$SANDBOX_PATH"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user