Skip to content
Snippets Groups Projects
Commit 98c15d01 authored by rds's avatar rds
Browse files

Single script to run the whole build suite for development purposes

parent 8de57fc5
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
# ================= README ==================
# This is a development version of zmap_overnight.sh that can be run
# to test the build.
# ================== CONFIG ==================
# Configuring variables
SRC_MACHINE=tviewsrv
# For development make sure these are set
CVS_CHECKOUT_SCRIPT=./build_bootstrap.sh
HOSTNAME=$(hostname)
SCRIPT_DIR=$(pwd)
(cat <<EOF
#!/bin/echo Generated by $0
echo Development script, Not for production!
ZMAP_MASTER_BUILD_DEVELOPMENT_DIR=$HOSTNAME:$SCRIPT_DIR
EOF
) | ssh $SRC_MACHINE '/bin/bash -c "cat - > /var/tmp/root_develop.sh"'
# ================== MAIN PART ==================
# A one step copy, run, cleanup!
# The /bin/kill -9 -$$; line is there to make sure no processes are left behind if the
# root_checkout.sh looses one... In testing, but appears kill returns non-zero in $?
# actually it's probably the bash process returning the non-zero, but the next test
# appears to succeed if we enter _rm_exit(), which is what we want.
echo "Enter zmap password at prompt."
cat $CVS_CHECKOUT_SCRIPT | ssh zmap@$SRC_MACHINE '/bin/bash -c "\
function _rm_exit \
{ \
echo Master Script Failed...; \
rm -f root_checkout.sh; \
/bin/kill -9 -$$; \
exit 1; \
}; \
cd /var/tmp || exit 1; \
rm -f root_checkout.sh || exit 1; \
cat - > root_checkout.sh || exit 1; \
chmod 755 root_checkout.sh || _rm_exit; \
: Change the variables in next line ; \
./root_checkout.sh RELEASE_LOCATION=~/BUILDS/OVERNIGHT ZMAP_MASTER_RT_TO_CVS=no || _rm_exit; \
: ; \
rm -f root_checkout.sh || exit 1; \
"' 2>&1
ssh $SRC_MACHINE 'rm -f /var/tmp/root_develop.sh'
# ================== END OF SCRIPT ==================
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment