2017-11-25 19:08:58 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2022-03-16 17:12:30 +00:00
|
|
|
onlystatic="yes"
|
2021-05-26 09:44:44 +00:00
|
|
|
|
2021-05-26 09:45:35 +00:00
|
|
|
if [ $# -ge 1 ]; then
|
2022-03-16 17:12:30 +00:00
|
|
|
onlystatic=""
|
2021-05-26 09:44:44 +00:00
|
|
|
fi
|
|
|
|
|
2017-11-25 19:08:58 +00:00
|
|
|
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 \
|
2021-05-26 09:44:44 +00:00
|
|
|
~/vcs/cdist-workdir/dot-cdist \
|
2023-12-08 08:26:51 +00:00
|
|
|
~/vcs/ansible-main \
|
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
|
2020-12-08 09:34:41 +00:00
|
|
|
|
2021-03-16 14:10:24 +00:00
|
|
|
case $repo in
|
|
|
|
~/.password-store)
|
|
|
|
git checkout master
|
|
|
|
git add .
|
|
|
|
git commit -m "updated by $0" || true
|
|
|
|
git pull
|
|
|
|
git checkout nico-privat
|
|
|
|
;;
|
|
|
|
~/vcs/cdist-workdir)
|
|
|
|
mr update
|
|
|
|
;;
|
|
|
|
esac
|
2020-12-08 09:34:41 +00:00
|
|
|
|
2017-11-25 19:08:58 +00:00
|
|
|
git add .
|
2021-01-25 15:04:59 +00:00
|
|
|
git commit -m "updated by $0 on $(hostname)" || true
|
2017-11-25 19:08:58 +00:00
|
|
|
git pull
|
|
|
|
git push
|
|
|
|
done
|
2021-01-17 13:13:27 +00:00
|
|
|
|
|
|
|
# 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
|
|
|
|
|
2021-05-26 09:44:44 +00:00
|
|
|
if [ $onlystatic ]; then
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2021-01-18 17:17:23 +00:00
|
|
|
set +e
|
|
|
|
|
2021-01-17 13:13:27 +00:00
|
|
|
for repo in ~/vcs/*; do
|
2021-01-17 13:14:39 +00:00
|
|
|
echo "$repo"
|
2021-01-17 13:13:27 +00:00
|
|
|
cd ${repo}
|
|
|
|
git pull
|
|
|
|
git push
|
|
|
|
done
|