timestamp=$(stat -c %Y $f) ||:
wget -N https://www.torproject.org/dist/torbrowser/$ver/$f
new_timestamp=$(stat -c %Y $f) ||:
-if [[ $timestamp == $new_timestamp && -e /a/opt/tor-browser_en-US/Browser/start-tor-browser ]]; then
- # already installed
- exit 0
+if [[ $timestamp != $new_timestamp || ! -e /a/opt/tor-browser_en-US/Browser/start-tor-browser ]]; then
+ # not already installed
+ rm -rf tor-browser_en-US
+ ex $f
fi
-rm -rf tor-browser_en-US
-ex $f
for x in tor-*.tar.xz; do
# cleanup old tarballs