aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xtools/load-settings.sh13
1 files changed, 5 insertions, 8 deletions
diff --git a/tools/load-settings.sh b/tools/load-settings.sh
index f33e6b3..66ec879 100755
--- a/tools/load-settings.sh
+++ b/tools/load-settings.sh
@@ -1,7 +1,3 @@
1if [[ -z "$SETTING_DIR" ]]; then
2 SETTING_DIR=$HOME/settings
3fi
4
5if [[ $0 == 'zsh' ]]; then 1if [[ $0 == 'zsh' ]]; then
6 setopt extended_glob 2 setopt extended_glob
7elif [[ $0 == 'bash' ]]; then 3elif [[ $0 == 'bash' ]]; then
@@ -12,16 +8,14 @@ fi
12export EDITOR=vim 8export EDITOR=vim
13 9
14# load custom aliases 10# load custom aliases
11SETTING_DIR=${SETTING_DIR:=$HOME/settings}
15source $SETTING_DIR/alias 12source $SETTING_DIR/alias
16 13
17# sync with important git repos
18$SETTING_DIR/tools/sync.sh
19
20# Add custom scripts into PATH 14# Add custom scripts into PATH
21BIN_DIR=$HOME/bin 15BIN_DIR=$HOME/bin
22PATH=$PATH:$BIN_DIR 16PATH=$PATH:$BIN_DIR
23mkdir -p $BIN_DIR 17mkdir -p $BIN_DIR
24find $BIN_DIR -xtype l | xargs rm 18find $BIN_DIR -xtype l | xargs rm 2>/dev/null || true
25 19
26find $SETTING_DIR/tools -type f -executable | \ 20find $SETTING_DIR/tools -type f -executable | \
27xargs realpath | xargs -I{} ln -sf {} $BIN_DIR 21xargs realpath | xargs -I{} ln -sf {} $BIN_DIR
@@ -30,5 +24,8 @@ xargs realpath | xargs -I{} ln -sf {} $BIN_DIR
30OSM_UTIL_DIR=$SETTING_DIR/tools/osm 24OSM_UTIL_DIR=$SETTING_DIR/tools/osm
31source $OSM_UTIL_DIR/osm 25source $OSM_UTIL_DIR/osm
32 26
27# sync with important git repos
28$SETTING_DIR/tools/sync.sh
29
33# go 30# go
34PATH=$PATH:$HOME/go/bin 31PATH=$PATH:$HOME/go/bin