aboutsummaryrefslogtreecommitdiffhomepage
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/init/check_upstream2
-rwxr-xr-xbin/install.sh12
-rw-r--r--bin/osm/osm2
-rwxr-xr-xbin/wakeup.sh2
4 files changed, 9 insertions, 9 deletions
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
21 echo "New commit at" "$1" 21 echo "New commit at" "$1"
22fi 22fi
23 23
24echo "$(date)" check "$1" >> "$SETTING_DIR/log" || echo error happens when check upstream at $1 24echo "$(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 @@
3set -e 3set -e
4 4
5# Default settings 5# Default settings
6SETTING_DIR=${SETTING_DIR:-~/helper} 6HELPER_DIR=${HELPER_DIR:-~/helper}
7REPO=${REPO:-typebrook/helper} 7REPO=${REPO:-typebrook/helper}
8REMOTE=${REMOTE:-https://github.com/${REPO}.git} 8REMOTE=${REMOTE:-https://github.com/${REPO}.git}
9BRANCH=${BRANCH:-dev} 9BRANCH=${BRANCH:-dev}
@@ -20,8 +20,8 @@ case "$(basename $SHELL)" in
20esac 20esac
21 21
22# If ~/helper doesn't exist, do git clone 22# If ~/helper doesn't exist, do git clone
23if [ ! -d $SETTING_DIR ]; then 23if [ ! -d $HELPER_DIR ]; then
24 git clone --depth=1 --branch "$BRANCH" "$REMOTE" "$SETTING_DIR" || { 24 git clone --depth=1 --branch "$BRANCH" "$REMOTE" "$HELPER_DIR" || {
25 error "git clone of helper repo failed" 25 error "git clone of helper repo failed"
26 exit 1 26 exit 1
27 } 27 }
@@ -32,11 +32,11 @@ sed -i "\^$COMMENT_IN_RCFILE^, /^$/ d" $RCFILE
32cat >>$RCFILE <<EOF 32cat >>$RCFILE <<EOF
33 33
34$COMMENT_IN_RCFILE 34$COMMENT_IN_RCFILE
35export SETTING_DIR=$SETTING_DIR 35export HELPER_DIR=$HELPER_DIR
36source \$SETTING_DIR/$PROFILE 36source \$HELPER_DIR/$PROFILE
37 37
38EOF 38EOF
39 39
40echo Add profile into $RCFILE 40echo Add profile into $RCFILE
41cd "$SETTING_DIR" || exit 1 41cd "$HELPER_DIR" || exit 1
42make 42make
diff --git a/bin/osm/osm b/bin/osm/osm
index 344f906..4111eae 100644
--- a/bin/osm/osm
+++ b/bin/osm/osm
@@ -5,7 +5,7 @@ export OSM_SERVER=https://api.openstreetmap.org
5export OSM_TES_SERVER=https://api.openstreetmap.org 5export OSM_TES_SERVER=https://api.openstreetmap.org
6 6
7export OSM_API=$OSM_SERVER/api/0.6 7export OSM_API=$OSM_SERVER/api/0.6
8export OSM_USER_PASSWD=$(cat $SETTING_DIR/tokens/osm 2>/dev/null) 8export OSM_USER_PASSWD=$(cat $HELPER_DIR/tokens/osm 2>/dev/null)
9 9
10FILENAME=$0 10FILENAME=$0
11 11
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 @@
2 2
3date +%s >~/.wakeup 3date +%s >~/.wakeup
4 4
5find $SETTING_DIR/bin -executable | while read file; do ln -sf $file ~/bin/; done 5find $HELPER_DIR/bin -executable | while read file; do ln -sf $file ~/bin/; done