Files
containers/slides/upload.sh
Marco Verleun b6e70b4cac
Some checks failed
Gitea Actions Demo Training / Explore-Gitea-Actions (push) Failing after 14s
Fixed files
2024-01-07 21:17:15 +01:00

34 lines
541 B
Bash
Executable File

#!/bin/bash
trap 'echo "Stopping sync"; exit 0' EXIT SIGINT SIGTERM
function upload() {
rsync -r images/ slides.zip *html *css *js vps.verleun.org:/docker/web-sites/site/
}
function commit() {
git add *html *jpg
git commit -m 'New HTML'
git push
}
case "$1" in
once)
commit
;;
forever)
set +e
# check if entr is installed
# if ! command -v inotifywait >/dev/null; then
# echo >&2 "First install 'inotifywait' with apt, brew, etc."
# exit
# fi
while true; do
fswatch -1 *html
commit
done
;;
esac