diff options
Diffstat (limited to 'bin/init')
| -rwxr-xr-x | bin/init/load-settings.sh | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/bin/init/load-settings.sh b/bin/init/load-settings.sh index 1b94c63..11b1b56 100755 --- a/bin/init/load-settings.sh +++ b/bin/init/load-settings.sh | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | trap 'exit.sh' EXIT | 1 | trap 'exit.sh' EXIT |
| 2 | 2 | ||
| 3 | export SETTING_DIR=${SETTING_DIR:=$HOME/helper} | 3 | export SETTING_DIR=${SETTING_DIR:=$HOME/helper} |
| 4 | export BIN_DIR=~/bin | ||
| 5 | export PATH=$PATH:$BIN_DIR | ||
| 4 | export EDITOR=nvim | 6 | export EDITOR=nvim |
| 5 | export VISUAL=nvim | 7 | export VISUAL=nvim |
| 6 | export TIG_EDITOR=nvim | 8 | export TIG_EDITOR=nvim |
| @@ -18,17 +20,6 @@ source $SETTING_DIR/alias | |||
| 18 | [[ -d $SETTING_DIR/private ]] && for f in $SETTING_DIR/private/*; do source $f; done | 20 | [[ -d $SETTING_DIR/private ]] && for f in $SETTING_DIR/private/*; do source $f; done |
| 19 | find $SETTING_DIR/bin -not -executable -name '*rc' | while read rcfile; do source $rcfile; done | 21 | find $SETTING_DIR/bin -not -executable -name '*rc' | while read rcfile; do source $rcfile; done |
| 20 | 22 | ||
| 21 | # Add custom scripts into PATH | ||
| 22 | BIN_DIR=$HOME/bin | ||
| 23 | PATH=$BIN_DIR:$PATH | ||
| 24 | mkdir -p $BIN_DIR | ||
| 25 | find $BIN_DIR -xtype l -exec rm {} + 2>/dev/null | ||
| 26 | find $SETTING_DIR/bin -type f -executable -exec realpath {} + | \ | ||
| 27 | xargs -I{} ln -sf {} $BIN_DIR | ||
| 28 | |||
| 29 | # sync with important git repos | ||
| 30 | setsid sync.sh | ||
| 31 | |||
| 32 | # local | 23 | # local |
| 33 | PATH=$PATH:$HOME/.local/bin | 24 | PATH=$PATH:$HOME/.local/bin |
| 34 | # go | 25 | # go |