Skip to content

Commit

Permalink
Add automatic repository push capability to build script
Browse files Browse the repository at this point in the history
This commits follow the one done in globaleaks: globaleaks/GlobaLeaks@8c7dd61
  • Loading branch information
evilaliv3 committed Jan 26, 2016
1 parent cf8d692 commit 9557b6b
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions scripts/build.sh
Expand Up @@ -9,20 +9,24 @@ usage() {
echo -e " -t tagname (build specific release/branch)"
echo -e " -d distribution (available: precise, trusty, wheezy, jessie)"
echo -e " -n (do not sign)"
echo -e " -p (push on repository)"
}

DISTRIBUTION="precise"
TAG="master"
NOSIGN=0
PUSH=0

while getopts "d:n:th" opt; do
while getopts "d:t:np:h" opt; do
case $opt in
d) DISTRIBUTION="$OPTARG"
;;
t) TAG="$OPTARG"
;;
n) NOSIGN=1
;;
p) PUSH=1
;;
h)
usage
exit 1
Expand Down Expand Up @@ -51,7 +55,7 @@ fi
# Preliminary Requirements Check
ERR=0
echo "Checking preliminary Tor2web Build requirements"
for REQ in git debuild
for REQ in git debuild dput
do
if which $REQ >/dev/null; then
echo " + $REQ requirement meet"
Expand Down Expand Up @@ -94,3 +98,16 @@ for TARGET in $TARGETS; do

cd ../../
done

if [ $PUSH -eq 1 ]; then
for TARGET in $TARGETS; do

BUILDDIR="T2WRelease-$TARGET"

cp -r $BUILDSRC $BUILDDIR

dput globaleaks tor2web*changes

cd ../../
done
fi

0 comments on commit 9557b6b

Please sign in to comment.