2021-11-04 11:14:50 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# Conveniently use sysyadm
|
|
|
|
unignore="/etc/yadm/unignore"
|
2022-09-03 18:09:25 +00:00
|
|
|
test -r "$unignore" && cat "$unignore" | while read f; do eval ls -d $f; done | sysyadm add --intent-to-add --pathspec-from-file=- 2>/dev/null
|
2021-11-04 11:14:50 +00:00
|
|
|
case "$1" in
|
|
|
|
("") sysyadm s;;
|
|
|
|
(p) sysyadm p;;
|
|
|
|
(l) sysyadm fetch && sy rebase main --onto origin/main;;
|
2022-11-30 10:23:38 +00:00
|
|
|
(clone)
|
|
|
|
sudo mkdir -p /etc/yadm
|
|
|
|
sudo chown -R $USER /etc/yadm
|
|
|
|
sysyadm clone -w / gitea@git.jfischer.org:xeruf/etc.git --bootstrap;;
|
2021-12-02 22:47:44 +00:00
|
|
|
(init) sudo -E sysyadm init -b main -w /;;
|
2021-11-04 11:14:50 +00:00
|
|
|
(*) sudo -E sysyadm "$@";;
|
|
|
|
esac
|
|
|
|
sudo chown -R $USER /etc/yadm
|
2023-01-20 07:41:07 +00:00
|
|
|
sudo chmod ugo+rw /tmp/git -R 2>/dev/null
|