-git-buildpackage --git-debian-branch="$(git branch | awk -F\*\ '/^* / { print $2}' )" --git-ignore-new
-printf "Finished execution of $(basename $0). Do not forget to tag release ${debian_version}\n"
+if [ -n "${AUTOBUILD:-}" ] ; then
+ [ -d ../grml-live.build-area ] || mkdir ../grml-live.build-area
+ git-buildpackage --git-ignore-branch --git-ignore-new --git-export-dir=../grml-live.build-area -us -uc
+else
+ git-buildpackage --git-ignore-branch --git-ignore-new $*
+ printf "Finished execution of $(basename $0). Do not forget to tag release ${debian_version}\n"
+fi
+
+if [ -n "${AUTOBUILD:-}" ] ; then
+ (
+ cd ../grml-live.build-area
+ dpkg-scanpackages . /dev/null > Packages
+ )
+ apt-get update
+ PACKAGES=$(dpkg --list grml-live\* | awk '/^ii/ {print $2}')
+ apt-get -y --allow-unauthenticated install $PACKAGES
+fi