lots of updates
[distro-setup] / rew
diff --git a/rew b/rew
index 860a3038a520432ede34f57bc08dfb048961500d..ee1aaf430ed703c8671d005aa6e55039c5632cdf 100755 (executable)
--- a/rew
+++ b/rew
@@ -1,9 +1,16 @@
 #!/bin/bash
-p="$(lsof -i tcp:31416 -Fp -a -c java | sed -rn 's/^p//p')"
+
+set -eE -o pipefail
+trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
+
+p="$(lsof -i tcp:31416 -Fp -a -c java | sed -rn 's/^p//p')" ||:
 if [[ $p ]]; then
     kill $p
 fi
-cd /a/opt/gnirehtet
+
+# so we don't hold open the /a fs
+sudo rsync -r --delete /a/opt/gnirehtet /opt
+cd /opt/gnirehtet
 ./gnirehtet rt &>/tmp/rt &
 # note, to kill it, you need to also kill
 # lsof -i tcp:31416