summaryrefslogtreecommitdiff
path: root/sh/upd
diff options
context:
space:
mode:
authorXiao Pan <gky44px1999@gmail.com>2024-06-18 20:57:48 -0700
committerXiao Pan <gky44px1999@gmail.com>2024-06-18 20:57:48 -0700
commit769328acc39a5c2908f0c8febe57c37b630f4a7f (patch)
treedae5c2120ae1e4d4eec9a2738e04f26110d33a21 /sh/upd
parent7e035dccd4bd07e58f7639d1ed4ad6f2d563efda (diff)
I decided to use `cd ... || exit` instead of `exit 1`
Because only exit will still return cd error code, so no need to exit 1.
Diffstat (limited to 'sh/upd')
-rwxr-xr-xsh/upd2
1 files changed, 1 insertions, 1 deletions
diff --git a/sh/upd b/sh/upd
index e3e70b1..a305eb2 100755
--- a/sh/upd
+++ b/sh/upd
@@ -23,7 +23,7 @@ backup () {
# Pull repos and branches from studio, so one more backup on insp or duplicity will backup to ia,for one more backup for 321 backup rule
# cfgl master and pp branches already satisfy 321 rule. Here are three copies: 1. master/pp, 2. studio, 3. gitlab or alternative
# But I still copy those on insp because one more copy will not hurt. And all my other data stil satisfy 3 copies without backup to gitlab, so why left out cfgl? Also it may be nice if I what to use that local dir for searching things.
- cd "$HOME/programs/config_local_arch" || exit 1
+ cd "$HOME/programs/config_local_arch" || exit
git branch | awk '{print ($1=="*")?$2:$1}' | while read -r branch; do
git checkout "$branch"
git pull