This commit is contained in:
parent
92245275e7
commit
547fda14c5
|
|
@ -59,23 +59,6 @@ EOF
|
||||||
fi
|
fi
|
||||||
rsync -a "$config_repo_path/home/tt/.ssh/" "/home/tt/.ssh"
|
rsync -a "$config_repo_path/home/tt/.ssh/" "/home/tt/.ssh"
|
||||||
rsync -a --delete "$config_repo_path/home/tt/.config/" "/home/tt/.config"
|
rsync -a --delete "$config_repo_path/home/tt/.config/" "/home/tt/.config"
|
||||||
joj3-forge convert "/home/tt/.config/joj"
|
|
||||||
rsync -a --delete "/home/tt/.config/joj/" "$config_repo_path/home/tt/.config/joj"
|
|
||||||
|
|
||||||
# enforce correct permissions
|
|
||||||
chmod 751 "/home/tt/"
|
|
||||||
chmod 750 "/home/tt/.cache/" || true
|
|
||||||
chmod 750 "/home/tt/.cache/joj3" || true
|
|
||||||
chmod 700 "/home/tt/.ssh/" || true
|
|
||||||
chmod 700 "/home/tt/.config/"
|
|
||||||
|
|
||||||
# commit config changes
|
|
||||||
git -C "$config_repo_path" add home/tt/.config/joj
|
|
||||||
if ! git -C "$config_repo_path" diff --staged --quiet; then
|
|
||||||
commit_hash=$(git -C "$config_repo_path" rev-parse HEAD)
|
|
||||||
git -C "$config_repo_path" commit -m "chore: $commit_hash trigger joj3-forge convert [skip ci]"
|
|
||||||
git -C "$config_repo_path" push
|
|
||||||
fi
|
|
||||||
|
|
||||||
# check gitea token
|
# check gitea token
|
||||||
if [ -n "${TEAPOT_GITEA_TOKEN:-}" ]; then
|
if [ -n "${TEAPOT_GITEA_TOKEN:-}" ]; then
|
||||||
|
|
@ -93,6 +76,24 @@ EOF
|
||||||
echo "FATAL: TEAPOT_GITEA_TOKEN not set, ask admin to set it" >&2
|
echo "FATAL: TEAPOT_GITEA_TOKEN not set, ask admin to set it" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
joj3-forge convert "/home/tt/.config/joj"
|
||||||
|
rsync -a --delete "/home/tt/.config/joj/" "$config_repo_path/home/tt/.config/joj"
|
||||||
|
|
||||||
|
# enforce correct permissions
|
||||||
|
chmod 751 "/home/tt/"
|
||||||
|
chmod 750 "/home/tt/.cache/" || true
|
||||||
|
chmod 750 "/home/tt/.cache/joj3" || true
|
||||||
|
chmod 700 "/home/tt/.ssh/" || true
|
||||||
|
chmod 700 "/home/tt/.config/"
|
||||||
|
|
||||||
|
# commit config changes
|
||||||
|
git -C "$config_repo_path" add home/tt/.config/joj
|
||||||
|
if ! git -C "$config_repo_path" diff --staged --quiet; then
|
||||||
|
commit_hash=$(git -C "$config_repo_path" rev-parse HEAD)
|
||||||
|
git -C "$config_repo_path" commit -m "chore: $commit_hash trigger joj3-forge convert [skip ci]"
|
||||||
|
git -C "$config_repo_path" push
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
main "$@"
|
main "$@"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user