dotfiles/.local/bin/scripts/sy

18 lines
604 B
Plaintext
Raw Normal View History

#!/bin/sh
# Conveniently use sysyadm
unignore="/etc/yadm/unignore"
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
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 /;;
(*) sudo -E sysyadm "$@";;
esac
sudo chown -R $USER /etc/yadm
2023-01-04 22:37:26 +00:00
sudo chmod ugo+rw /tmp/git -R