nsbin/sync-all-repos

37 lines
725 B
Text
Raw Normal View History

2017-11-25 19:08:58 +00:00
#!/bin/sh
set -e
for repo in ~/.ctt \
2020-05-12 15:32:08 +00:00
~/bin \
~/vcs/notes \
2017-12-23 23:13:41 +00:00
~/vcs/nico-dot-cdist \
2017-11-25 19:08:58 +00:00
~/.password-store \
; do
2017-11-25 22:03:30 +00:00
echo $repo
2017-11-25 19:08:58 +00:00
cd $repo
if [ $repo = ~/.password-store ]; then
git checkout master
git add .
git commit -m "updated by $0" || true
git pull
git checkout nico-privat
fi
2017-11-25 19:08:58 +00:00
git add .
2017-11-25 22:03:30 +00:00
git commit -m "updated by $0" || true
2017-11-25 19:08:58 +00:00
git pull
git push
done
# Step 2: pull/push all other repos in ~/vcs/
# We cannot commit as we do not know the state, but we
# can ensure everything committed before is pushed out
for repo in ~/vcs/*; do
cd ${repo}
git pull
git push
done