commit ff6e10a843539f92e9178606c81ea7044356bed2 Author: Damian Johnson atagar@torproject.org Date: Fri Apr 22 17:57:18 2011 -0700
Adding an exporter script for arm's release branch
A downside of moving from svn to git is that we no longer have a bundled TorCtl or easy counterpart of 'svn export'. This does both of these things to make generating release exports easy. --- export.sh | 33 +++++++++++++++++++++++++++++++++ 1 files changed, 33 insertions(+), 0 deletions(-)
diff --git a/export.sh b/export.sh new file mode 100755 index 0000000..79c6b38 --- /dev/null +++ b/export.sh @@ -0,0 +1,33 @@ +#!/bin/sh +# Exports a copy of arm's release branch to the given location. This copy is +# stripped of git metadata and includes a bundled copy of TorCtl. This accepts +# an optional argument for where to place the export. + +if [ $# -lt 1 ] + then exportDst="./arm" + else exportDst=$1 +fi + +# if the destination already exists then abort +if [ -d $exportDst ] +then + echo "unable to export, destination already exists: $exportDst" + exit 1 +fi + +# exports arm's release branch +mkdir $exportDst +git archive --format=tar release | (cd $exportDst && tar xf -) + +# fetches torctl to /tmp +torctlDir="$(mktemp -d)" +git clone git://git.torproject.org/pytorctl.git $torctlDir > /dev/null + +# exports torctl to the arm directory +(cd $torctlDir && git archive --format=tar --prefix=TorCtl/ master) | (cd $exportDst/src && tar xf - 2> /dev/null) + +# cleans up the temporary torctl repo +rm -rf torctlDir + +echo "arm exported to $exportDst" +