From: John Hodge Date: Tue, 21 Jan 2014 11:33:23 +0000 (+0800) Subject: DoRelease - Switch to bash so replacement works X-Git-Tag: rel0.15 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=601a8a1533c4abdc8bd161ec6df3c68c8e458a34;p=tpg%2Facess2.git DoRelease - Switch to bash so replacement works --- diff --git a/DoRelease b/DoRelease index 9d861812..9d69721b 100755 --- a/DoRelease +++ b/DoRelease @@ -1,4 +1,5 @@ -#!/bin/sh +#!/bin/bash +set -x # NOTE: This is rather specific to my setup :) @@ -12,15 +13,17 @@ _RELDIR=/home/http/www/Downloads/Acess2/ ./MakeReleaseSet armv7 realview_pb ./MakeReleaseSet armv7 tegra2 +rm -f Releases/*_armv7-*.img.gz for f in Releases/*.gz; do - newname=${f/_latest_/_${REL}_} + newname=${f/latest/$REL} cp $f $newname done -rm Releases/*_armv7-*.img.gz cp Releases/* ${_RELDIR} -git archive --format=tar --prefix=Acess2/ HEAD | gzip > ${_RELDIR}Acess2_git.tar.gz -git tag rel${REL_DOT} +if [[ $# -lt 2 ]] || [[ "$1" != "-n" ]]; then + git archive --format=tar --prefix=Acess2/ HEAD | gzip > ${_RELDIR}Acess2_git.tar.gz + git tag rel${REL_DOT} +fi cd ${_RELDIR} cp Acess2_git.tar.gz Acess2_${REL}.tar.gz