Files
i2p.www/site-updater-i2hq.sh

17 lines
478 B
Bash
Raw Normal View History

2013-08-28 23:13:27 +00:00
#!/bin/sh
TMP=$(mktemp XXXXXXXXXX)
trap 'rm -f $TMP;exit' 0 1 2 15
2013-08-28 23:13:27 +00:00
2013-10-01 11:51:00 +00:00
mtn pull
2013-08-28 23:13:27 +00:00
mtn update 2>&1 | tee $TMP
if grep "^mtn: \(add\|dropp\|updat\)ing 'i2p2www/translations/" "$TMP" >/dev/null; then
2013-08-28 23:13:27 +00:00
echo "Translations updated, compiling messages"
./compile-messages-i2hq.sh
fi
2013-10-23 18:45:21 +00:00
if grep "^mtn: updating 'i2p2www/.*\.py\|^mtn: updating 'i2p2www/.*/.*\.py" "$TMP" >/dev/null; then
2013-08-28 23:13:27 +00:00
echo "Python files changed, restarting server"
touch /tmp/2fcd2f17-c293-4f77-b4c9-9b266ba70daa
fi