aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xbin/init/load-settings.sh13
-rwxr-xr-xbin/wakeup.sh16
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 @@
1trap 'exit.sh' EXIT 1trap 'exit.sh' EXIT
2 2
3export SETTING_DIR=${SETTING_DIR:=$HOME/helper} 3export SETTING_DIR=${SETTING_DIR:=$HOME/helper}
4export BIN_DIR=~/bin
5export PATH=$PATH:$BIN_DIR
4export EDITOR=nvim 6export EDITOR=nvim
5export VISUAL=nvim 7export VISUAL=nvim
6export TIG_EDITOR=nvim 8export 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
19find $SETTING_DIR/bin -not -executable -name '*rc' | while read rcfile; do source $rcfile; done 21find $SETTING_DIR/bin -not -executable -name '*rc' | while read rcfile; do source $rcfile; done
20 22
21# Add custom scripts into PATH
22BIN_DIR=$HOME/bin
23PATH=$BIN_DIR:$PATH
24mkdir -p $BIN_DIR
25find $BIN_DIR -xtype l -exec rm {} + 2>/dev/null
26find $SETTING_DIR/bin -type f -executable -exec realpath {} + | \
27xargs -I{} ln -sf {} $BIN_DIR
28
29# sync with important git repos
30setsid sync.sh
31
32# local 23# local
33PATH=$PATH:$HOME/.local/bin 24PATH=$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
3set -x
4
5# Add custom scripts into PATH
6export SETTING_DIR=~/helper
7export BIN_DIR=$HOME/bin
8export PATH=$BIN_DIR:$PATH
9
10mkdir -p $BIN_DIR
11find $BIN_DIR -xtype l -exec rm {} + 2>/dev/null
12find $SETTING_DIR/bin -type f -executable -exec realpath {} + | \
13xargs -I{} ln -sf {} $BIN_DIR
14
15# sync with important git repos
16setsid ~/bin/check-repos.sh