# HG changeset patch # User Tormod Volden # Date 1422054018 -3600 # Node ID f3decf362611ed8455cbec1cb5d3bb0360519737 # Parent 7a78f43d97c1b7d6a3496795cda14372811cf21b Update burst script to use uploader's date and filename diff -r 7a78f43d97c1 -r f3decf362611 scripts/burst --- a/scripts/burst Fri Jan 23 23:35:28 2015 +0100 +++ b/scripts/burst Sat Jan 24 00:00:18 2015 +0100 @@ -1,16 +1,23 @@ #!/bin/sh -e +NAME=$1 +TAG=$2 + HTDOCS=/home/project-web/nitros9/htdocs -TODAY=$(date +%Y%m%d) + +if [ -z "$TAG" ]; then + echo "$0: Missing name and date tag" + exit 1 +fi cd $HTDOCS -mkdir latest-$TODAY -cd latest-$TODAY -unzip -o ../nitros9project-$TODAY.zip +mkdir latest-$TAG +cd latest-$TAG +unzip -o ../$NAME-$TAG.zip echo "Options +Indexes" > .htaccess cd $HTDOCS rm latest -ln -s latest-$TODAY latest -rm nitros9project.zip -ln -s nitros9project-$TODAY.zip nitros9project.zip +ln -s latest-$TAG latest +rm $NAME.zip +ln -s $NAME-$TAG.zip $NAME.zip