Mercurial > hg > Members > kono > nitros9-code
diff scripts/burst @ 3042:f3decf362611
Update burst script to use uploader's date and filename
author | Tormod Volden <debian.tormod@gmail.com> |
---|---|
date | Sat, 24 Jan 2015 00:00:18 +0100 |
parents | d76362b779c0 |
children | d9cb87a32d7a |
line wrap: on
line diff
--- 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