From cda0870089c57d9b3859af0e58de0349da559020 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Sun, 27 Jul 2025 21:03:50 +0800 Subject: Update --- bin/init/check_upstream | 2 +- bin/install.sh | 12 ++++++------ bin/osm/osm | 2 +- bin/wakeup.sh | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) (limited to 'bin') diff --git a/bin/init/check_upstream b/bin/init/check_upstream index fa6d277..529547b 100755 --- a/bin/init/check_upstream +++ b/bin/init/check_upstream @@ -21,4 +21,4 @@ if ! git rev-list "$head" | grep "$(git rev-parse origin/master)" > /dev/null; t echo "New commit at" "$1" fi -echo "$(date)" check "$1" >> "$SETTING_DIR/log" || echo error happens when check upstream at $1 +echo "$(date)" check "$1" >> "$HELPER_DIR/log" || echo error happens when check upstream at $1 diff --git a/bin/install.sh b/bin/install.sh index 94f23e5..3cf79d0 100755 --- a/bin/install.sh +++ b/bin/install.sh @@ -3,7 +3,7 @@ set -e # Default settings -SETTING_DIR=${SETTING_DIR:-~/helper} +HELPER_DIR=${HELPER_DIR:-~/helper} REPO=${REPO:-typebrook/helper} REMOTE=${REMOTE:-https://github.com/${REPO}.git} BRANCH=${BRANCH:-dev} @@ -20,8 +20,8 @@ case "$(basename $SHELL)" in esac # If ~/helper doesn't exist, do git clone -if [ ! -d $SETTING_DIR ]; then - git clone --depth=1 --branch "$BRANCH" "$REMOTE" "$SETTING_DIR" || { +if [ ! -d $HELPER_DIR ]; then + git clone --depth=1 --branch "$BRANCH" "$REMOTE" "$HELPER_DIR" || { error "git clone of helper repo failed" exit 1 } @@ -32,11 +32,11 @@ sed -i "\^$COMMENT_IN_RCFILE^, /^$/ d" $RCFILE cat >>$RCFILE </dev/null) +export OSM_USER_PASSWD=$(cat $HELPER_DIR/tokens/osm 2>/dev/null) FILENAME=$0 diff --git a/bin/wakeup.sh b/bin/wakeup.sh index 545511b..cdcaa51 100755 --- a/bin/wakeup.sh +++ b/bin/wakeup.sh @@ -2,4 +2,4 @@ date +%s >~/.wakeup -find $SETTING_DIR/bin -executable | while read file; do ln -sf $file ~/bin/; done +find $HELPER_DIR/bin -executable | while read file; do ln -sf $file ~/bin/; done -- cgit v1.2.3-70-g09d2