Skip to content

Commit

Permalink
Merge pull request #11 from FreifunkMD/make-manifest
Browse files Browse the repository at this point in the history
also build manifest
  • Loading branch information
eriu committed Aug 7, 2014
2 parents 1afa240 + 35604bd commit b77ce78
Showing 1 changed file with 57 additions and 2 deletions.
59 changes: 57 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,23 +1,78 @@
#!/bin/bash
# (pushd/popd needs an advanced shell)

set -e
set -x

SCRIPTDIR=$(dirname $0)

print_usage() {
echo "Usage: $0 [GLUON_BRANCH]"
echo ''
echo 'If GLUON_BRANCH is not given, experimental is set.'
echo ''
echo 'Options:'
echo ' -h show this help'
}

# command line options handling
ARGS=`getopt h $*`
if [ $? -ne 0 ]
then
print_usage
exit 2
fi
set -- $ARGS

while true
do
case "$1" in
-h)
print_usage
exit 0
;;
--)
shift; break;;
esac
done

# set GLUON_BRANCH for manifest
if [ -z "$1" ]
then
GLUON_BRANCH=experimental
echo 'Set GLUON_BRANCH to "experimental"!'
else
GLUON_BRANCH=$1
fi

case "xx$GLUON_BRANCH" in
'xxstable'|'xxbeta'|'xxexperimental')
# fine
;;
*)
echo "Unknown GLUON_BRANCH '$1'."
echo 'Use "stable", "beta", or "experimental"!'
exit 1
;;
esac

# get GLUON_CHECKOUT from site dir
pushd ${SCRIPTDIR}
eval `make -s -f helper.mk`
echo "GLUON_CHECKOUT: ${GLUON_CHECKOUT}"

# build
pushd ..
git checkout master
git pull
git checkout ${GLUON_CHECKOUT}
make clean
make update
make -j4
make all -j4
GLUON_BRANCH=${GLUON_BRANCH} make manifest
popd

popd

exit 0

# vim: set et sts=0 ts=4 sw=4 sr:

0 comments on commit b77ce78

Please sign in to comment.