diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/reproducible_setup_fdroid_build_environment.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/bin/reproducible_setup_fdroid_build_environment.sh b/bin/reproducible_setup_fdroid_build_environment.sh index d4c8d146..67a64b82 100755 --- a/bin/reproducible_setup_fdroid_build_environment.sh +++ b/bin/reproducible_setup_fdroid_build_environment.sh @@ -17,6 +17,24 @@ common_init "$@" WORKSPACE=$BASE/fdroid mkdir -p $WORKSPACE +cleanup_all() { + echo "$(date -u) - cleanup in progress..." + killall VBoxHeadless || true + sleep 10 + rm $WORKSPACE -r + echo "$(date -u) - cleanup done." +} +trap cleanup_all INT TERM EXIT + +# TODO: +# +# +# add locking here to only run this if no build job is running… +# +# +# not yet needed, as we don't have any build jobs yet + + # make sure we have the vagrant box image cached test -e ~/.cache/fdroidserver || mkdir -p ~/.cache/fdroidserver cd ~/.cache/fdroidserver @@ -33,3 +51,7 @@ cd $WORKSPACE git clone https://gitlab.com/fdroid/fdroidserver.git cd fdroidserver ./makebuildserver + +# remove trap +trap - INT TERM EXIT +echo "$(date -u) - the end." |