13d2aa231f56c354b17528b8d72c541b1f98b2e6 hiram Fri Jun 12 15:30:36 2026 -0700 existing script in the otto user account HOME/bin/ diff --git src/hg/utils/otto/sandboxupdate src/hg/utils/otto/sandboxupdate new file mode 100755 index 00000000000..7f3c7295807 --- /dev/null +++ src/hg/utils/otto/sandboxupdate @@ -0,0 +1,41 @@ +#!/bin/bash + +# Script to rebuild the current user's sandbox + +# Set environment +umask 002 +MACHTYPE=`uname -m` +PATH=/usr/local/bin:/bin:/usr/bin:/cluster/bin/${MACHTYPE}:${HOME}/bin/${MACHTPE}:/cluster/bin:/cluster/bin/scripts:${HOME}/bin:${HOME}/bin/scripts/ +export MACHTYPE PATH +if [ -z "${USER}" ]; then + USER=${otto} + export USER +fi + +# Clean up the source tree +#cd $HOME/kent/src && make clean > /dev/null 2> /dev/null && rm -f tags + +# Update the source tree +cd $HOME/kent +git pull > $HOME/git.pull.output 2>&1 +if [ $? -ne 0 ]; then + echo "git pull failed, see $HOME/git.pull.output" | \ + mail -s 'Git pull error on kent tree' ${otto} +fi + +# Build the CGIs +#cd ~/kent/src +#make -j 40 cgi > ~/daily.out 2>&1 +# If there are any errors, they will come via separate email from cron +#egrep -y "erro|warn" ~/daily.out | grep -v "\-Werror" | \ +# grep -v "gbWarn.o" | grep -v "disabling jobserver mode" +#make tags-all >/dev/null 2>&1 + +# Update htdocs +#cd ~/kent/src/hg/htdocs +#make user >/dev/null 2>&1 + +# Update trackDb +# Errors with context will be reported by cron +#cd ~/kent/src/hg/makeDb/trackDb/ +#make update |& grep -i -B20 error