From f35ba0dcc24404e0d5cfe8b4b996aacf089155e0 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Mon, 24 Apr 2023 14:08:03 +0800 Subject: Update --- bin/init/load-settings.sh | 13 ++----------- bin/wakeup.sh | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 11 deletions(-) create mode 100755 bin/wakeup.sh 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 @@ trap 'exit.sh' EXIT export SETTING_DIR=${SETTING_DIR:=$HOME/helper} +export BIN_DIR=~/bin +export PATH=$PATH:$BIN_DIR export EDITOR=nvim export VISUAL=nvim export TIG_EDITOR=nvim @@ -18,17 +20,6 @@ source $SETTING_DIR/alias [[ -d $SETTING_DIR/private ]] && for f in $SETTING_DIR/private/*; do source $f; done find $SETTING_DIR/bin -not -executable -name '*rc' | while read rcfile; do source $rcfile; done -# Add custom scripts into PATH -BIN_DIR=$HOME/bin -PATH=$BIN_DIR:$PATH -mkdir -p $BIN_DIR -find $BIN_DIR -xtype l -exec rm {} + 2>/dev/null -find $SETTING_DIR/bin -type f -executable -exec realpath {} + | \ -xargs -I{} ln -sf {} $BIN_DIR - -# sync with important git repos -setsid sync.sh - # local PATH=$PATH:$HOME/.local/bin # 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 @@ +#! /bin/bash + +set -x + +# Add custom scripts into PATH +export SETTING_DIR=~/helper +export BIN_DIR=$HOME/bin +export PATH=$BIN_DIR:$PATH + +mkdir -p $BIN_DIR +find $BIN_DIR -xtype l -exec rm {} + 2>/dev/null +find $SETTING_DIR/bin -type f -executable -exec realpath {} + | \ +xargs -I{} ln -sf {} $BIN_DIR + +# sync with important git repos +setsid ~/bin/check-repos.sh -- cgit v1.2.3-70-g09d2