diff options
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/init/load-settings.sh | 13 | ||||
| -rwxr-xr-x | bin/wakeup.sh | 16 |
2 files changed, 18 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 |
diff --git a/bin/wakeup.sh b/bin/wakeup.sh new file mode 100755 index 0000000..7de5f40 --- /dev/null +++ b/bin/wakeup.sh | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | #! /bin/bash | ||
| 2 | |||
| 3 | set -x | ||
| 4 | |||
| 5 | # Add custom scripts into PATH | ||
| 6 | export SETTING_DIR=~/helper | ||
| 7 | export BIN_DIR=$HOME/bin | ||
| 8 | export PATH=$BIN_DIR:$PATH | ||
| 9 | |||
| 10 | mkdir -p $BIN_DIR | ||
| 11 | find $BIN_DIR -xtype l -exec rm {} + 2>/dev/null | ||
| 12 | find $SETTING_DIR/bin -type f -executable -exec realpath {} + | \ | ||
| 13 | xargs -I{} ln -sf {} $BIN_DIR | ||
| 14 | |||
| 15 | # sync with important git repos | ||
| 16 | setsid ~/bin/check-repos.sh | ||