aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/load-settings.sh
diff options
context:
space:
mode:
authorHsieh Chin Fan <typebrook@gmail.com>2020-08-28 09:36:01 +0800
committerHsieh Chin Fan <typebrook@gmail.com>2020-08-28 09:36:01 +0800
commit3ad956f77c2673d1566f6ef00fabb850310b152d (patch)
treec8e000fd273505722cd0c6424045daf1f97ccc38 /tools/load-settings.sh
parent9e92499ff67a34f1fff33783ad4e852b000d7e58 (diff)
update
Diffstat (limited to 'tools/load-settings.sh')
-rwxr-xr-xtools/load-settings.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/load-settings.sh b/tools/load-settings.sh
index e6415e0..d933372 100755
--- a/tools/load-settings.sh
+++ b/tools/load-settings.sh
@@ -1,5 +1,11 @@
1if [[ -z "$SETTING_DIR" ]]; then 1if [[ -z "$SETTING_DIR" ]]; then
2 SETTING_DIR=$HOME/settings 2 SETTING_DIR=$HOME/settings
3fi
4
5if [[ $0 == 'zsh' ]]; then
6 setopt extended_glob
7elif [[ $0 == 'bash' ]]; then
8 shopt -s extglob
3fi 9fi
4 10
5# set default editor 11# set default editor
@@ -12,7 +18,7 @@ source $SETTING_DIR/alias
12PATH=$PATH:$SETTING_DIR/tools 18PATH=$PATH:$SETTING_DIR/tools
13find $SETTING_DIR/tools -type d | sed 1d |\ 19find $SETTING_DIR/tools -type d | sed 1d |\
14while read dir; do 20while read dir; do
15 PATH=$PATH:$dir 21 PATH=$PATH:$dir
16done 22done
17 23
18# sync with important git repos 24# sync with important git repos