From af7ce43c718cb6bc0d7aac4633a8113f9a540ec5 Mon Sep 17 00:00:00 2001 From: typebrook Date: Mon, 2 Mar 2020 20:34:40 +0800 Subject: update --- alias | 1 + 1 file changed, 1 insertion(+) diff --git a/alias b/alias index ebd31c9..d146dae 100644 --- a/alias +++ b/alias @@ -267,6 +267,7 @@ alias and='cd ~/git/geoBingAn.Android' alias cdT='cd ~/git/taiwan-topo' alias cdand='cd ~/git/sample' alias cdm='cd ~/git/tilemaker' +alias stew='cd ~/git/mapstew' TAIWAN_BBOX='118.1036,20.72799,122.9312,26.60305' TAIWAN_BBOX_V='20.72799,118.1036,26.60305,122.9312' -- cgit v1.2.3-70-g09d2 From f99cdfec4b49838ea8517d790e517e93f53ae26f Mon Sep 17 00:00:00 2001 From: typebrook Date: Mon, 2 Mar 2020 21:14:18 +0800 Subject: update --- tools/install.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tools/install.sh diff --git a/tools/install.sh b/tools/install.sh new file mode 100644 index 0000000..54bcef1 --- /dev/null +++ b/tools/install.sh @@ -0,0 +1,16 @@ +#! /usr/bin/env bash + +set -e + +# Default settings +SETTING_DIR=${SETTING_DIR:-~/settings} +REPO=${REPO:-typebrook/settings} +REMOTE=${REMOTE:-https://github.com/${REPO}.git} +BRANCH=${BRANCH:-master} + +git clone --depth=1 --branch "$BRANCH" "$REMOTE" "$SETTING_DIR" || { + error "git clone of settings repo failed" + exit 1 +} + +cd "$SETTING_DIR" && make -- cgit v1.2.3-70-g09d2 From d6d26c8df0d1fcf54fe566faee9bfeb14208c9f3 Mon Sep 17 00:00:00 2001 From: typebrook Date: Mon, 2 Mar 2020 21:16:32 +0800 Subject: update --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index fcd6c5d..95daccb 100644 --- a/Makefile +++ b/Makefile @@ -26,7 +26,7 @@ tig: wiki: # vimwiki if [ ! -d "$(HOME)/.vimwiki" ]; then \ - git clone --depth=1 git@github.com:typebrook/wiki.git ~/vimwiki; \ + git clone --depth=1 git@github.com:typebrook/wiki.git ~/vimwiki fi crontab: -- cgit v1.2.3-70-g09d2 From f01cf223ec4bdf98e70c1204ef1a95a76b23e162 Mon Sep 17 00:00:00 2001 From: typebrook Date: Mon, 2 Mar 2020 21:20:28 +0800 Subject: update --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..9489e8a --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +## Getting Started +**via curl** +``` +sh -c "$(curl -fsSL https://raw.githubusercontent.com/typebrook/settings/master/tools/install.sh)" +``` +**via wget** +``` +sh -c "$(wget -O- https://raw.githubusercontent.com/typebrook/settings/master/tools/install.sh)" +``` -- cgit v1.2.3-70-g09d2 From 15060f8ee1bbbfc1701b1a6eaf97b8715823f1f7 Mon Sep 17 00:00:00 2001 From: typebrook Date: Mon, 2 Mar 2020 21:48:14 +0800 Subject: update --- tools/install.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/install.sh b/tools/install.sh index 54bcef1..4d029c4 100644 --- a/tools/install.sh +++ b/tools/install.sh @@ -13,4 +13,12 @@ git clone --depth=1 --branch "$BRANCH" "$REMOTE" "$SETTING_DIR" || { exit 1 } +sed "/^# $REPO/, /^$/ d" +cat < Date: Mon, 2 Mar 2020 21:50:31 +0800 Subject: update --- tools/install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/install.sh b/tools/install.sh index 4d029c4..9f51f8c 100644 --- a/tools/install.sh +++ b/tools/install.sh @@ -15,10 +15,11 @@ git clone --depth=1 --branch "$BRANCH" "$REMOTE" "$SETTING_DIR" || { sed "/^# $REPO/, /^$/ d" cat <> ~/.$(basename $SHELL)rc cd "$SETTING_DIR" && make -- cgit v1.2.3-70-g09d2 From 39f98691082ea55cae182d77c7767616bed5f679 Mon Sep 17 00:00:00 2001 From: typebrook Date: Mon, 2 Mar 2020 21:53:02 +0800 Subject: update --- README.md | 4 ++-- tools/install.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9489e8a..c77e1c3 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ ## Getting Started **via curl** ``` -sh -c "$(curl -fsSL https://raw.githubusercontent.com/typebrook/settings/master/tools/install.sh)" +sh -c "$(curl -fsSL https://raw.githubusercontent.com/typebrook/settings/dev/tools/install.sh)" ``` **via wget** ``` -sh -c "$(wget -O- https://raw.githubusercontent.com/typebrook/settings/master/tools/install.sh)" +sh -c "$(wget -O- https://raw.githubusercontent.com/typebrook/settings/dev/tools/install.sh)" ``` diff --git a/tools/install.sh b/tools/install.sh index 9f51f8c..1969c9a 100644 --- a/tools/install.sh +++ b/tools/install.sh @@ -6,7 +6,7 @@ set -e SETTING_DIR=${SETTING_DIR:-~/settings} REPO=${REPO:-typebrook/settings} REMOTE=${REMOTE:-https://github.com/${REPO}.git} -BRANCH=${BRANCH:-master} +BRANCH=${BRANCH:-dev} git clone --depth=1 --branch "$BRANCH" "$REMOTE" "$SETTING_DIR" || { error "git clone of settings repo failed" -- cgit v1.2.3-70-g09d2 From 5907605fcfa68c8acd749d45008649539d74b4ce Mon Sep 17 00:00:00 2001 From: typebrook Date: Mon, 2 Mar 2020 21:54:55 +0800 Subject: update --- tools/install.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/install.sh b/tools/install.sh index 1969c9a..8acbbdd 100644 --- a/tools/install.sh +++ b/tools/install.sh @@ -8,10 +8,12 @@ REPO=${REPO:-typebrook/settings} REMOTE=${REMOTE:-https://github.com/${REPO}.git} BRANCH=${BRANCH:-dev} -git clone --depth=1 --branch "$BRANCH" "$REMOTE" "$SETTING_DIR" || { - error "git clone of settings repo failed" - exit 1 -} +if [[ -d $SETTING_DIR ]]; then + git clone --depth=1 --branch "$BRANCH" "$REMOTE" "$SETTING_DIR" || { + error "git clone of settings repo failed" + exit 1 + } +fi sed "/^# $REPO/, /^$/ d" cat < Date: Mon, 2 Mar 2020 22:01:09 +0800 Subject: update --- tools/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/install.sh b/tools/install.sh index 8acbbdd..89d805a 100644 --- a/tools/install.sh +++ b/tools/install.sh @@ -8,7 +8,7 @@ REPO=${REPO:-typebrook/settings} REMOTE=${REMOTE:-https://github.com/${REPO}.git} BRANCH=${BRANCH:-dev} -if [[ -d $SETTING_DIR ]]; then +if [ ! -d $SETTING_DIR ]; then git clone --depth=1 --branch "$BRANCH" "$REMOTE" "$SETTING_DIR" || { error "git clone of settings repo failed" exit 1 -- cgit v1.2.3-70-g09d2 From 46983235dcf463e576e1fc552a2f7c0ecf05d843 Mon Sep 17 00:00:00 2001 From: typebrook Date: Mon, 2 Mar 2020 22:03:30 +0800 Subject: update --- tools/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/install.sh b/tools/install.sh index 89d805a..758fd0e 100644 --- a/tools/install.sh +++ b/tools/install.sh @@ -15,7 +15,7 @@ if [ ! -d $SETTING_DIR ]; then } fi -sed "/^# $REPO/, /^$/ d" +sed -E "/^# $REPO/, /^$/ d" cat < Date: Mon, 2 Mar 2020 22:51:51 +0800 Subject: update --- tools/install.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/install.sh b/tools/install.sh index 758fd0e..0601c92 100644 --- a/tools/install.sh +++ b/tools/install.sh @@ -7,6 +7,7 @@ SETTING_DIR=${SETTING_DIR:-~/settings} REPO=${REPO:-typebrook/settings} REMOTE=${REMOTE:-https://github.com/${REPO}.git} BRANCH=${BRANCH:-dev} +RCFILE=${RCFILE:-~/.$(basename $SHELL)rc} if [ ! -d $SETTING_DIR ]; then git clone --depth=1 --branch "$BRANCH" "$REMOTE" "$SETTING_DIR" || { @@ -15,13 +16,13 @@ if [ ! -d $SETTING_DIR ]; then } fi -sed -E "/^# $REPO/, /^$/ d" -cat <> ~/.$(basename $SHELL)rc +" >> $RCFILE cd "$SETTING_DIR" && make -- cgit v1.2.3-70-g09d2 From 8877f608cb101f13c012225ee8177e31ccb9593d Mon Sep 17 00:00:00 2001 From: typebrook Date: Mon, 2 Mar 2020 23:19:05 +0800 Subject: update --- tools/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/install.sh b/tools/install.sh index 0601c92..4ec2586 100644 --- a/tools/install.sh +++ b/tools/install.sh @@ -16,7 +16,7 @@ if [ ! -d $SETTING_DIR ]; then } fi -sed -i "\^# $REPO^, /^$/ d" $RCFILE +sed -i "/^$/ N; \^# $REPO^, /^$/ d" $RCFILE echo " # $REPO -- cgit v1.2.3-70-g09d2 From 5778c2a4ac992eb5908830677becedf7f34e99d3 Mon Sep 17 00:00:00 2001 From: typebrook Date: Mon, 2 Mar 2020 23:47:13 +0800 Subject: update --- tools/install.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/install.sh b/tools/install.sh index 4ec2586..0eb2c5e 100644 --- a/tools/install.sh +++ b/tools/install.sh @@ -18,11 +18,9 @@ fi sed -i "/^$/ N; \^# $REPO^, /^$/ d" $RCFILE echo " - # $REPO export SETTING_DIR=$SETTING_DIR source \$SETTING_DIR/tools/load-settings.sh - " >> $RCFILE cd "$SETTING_DIR" && make -- cgit v1.2.3-70-g09d2