aboutsummaryrefslogtreecommitdiffhomepage
path: root/bin/install.sh
diff options
context:
space:
mode:
authorHsieh Chin Fan <pham@topo.tw>2025-07-27 21:03:50 +0800
committerHsieh Chin Fan <pham@topo.tw>2025-07-27 21:03:50 +0800
commitcda0870089c57d9b3859af0e58de0349da559020 (patch)
treea1e8c1dac6188439e478378d6b3f540d7f865d2a /bin/install.sh
parentdfb947732c2c57ff16c6e037f7aeda1844628368 (diff)
Update
Diffstat (limited to 'bin/install.sh')
-rwxr-xr-xbin/install.sh12
1 files changed, 6 insertions, 6 deletions
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