aboutsummaryrefslogtreecommitdiff
path: root/utils/ng/pkgbuild_bootstrap
diff options
context:
space:
mode:
Diffstat (limited to 'utils/ng/pkgbuild_bootstrap')
-rwxr-xr-xutils/ng/pkgbuild_bootstrap31
1 files changed, 24 insertions, 7 deletions
diff --git a/utils/ng/pkgbuild_bootstrap b/utils/ng/pkgbuild_bootstrap
index a618b2e..69ff1a6 100755
--- a/utils/ng/pkgbuild_bootstrap
+++ b/utils/ng/pkgbuild_bootstrap
@@ -1,5 +1,12 @@
#!/bin/bash
+if [ -z "$DOCKER_SETUP_SCRIPT" ]; then
+ echo $GPG_PRIV_KEY | base64 -d | gpg --import
+ cd "$(dirname "$0")"
+ cd ../../
+ echo "Current pwd: $(pwd)"
+fi
+
set -Eeo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
@@ -8,6 +15,7 @@ cleanup() {
unset SRCDEST
unset CONFDEST
unset TMPCONF
+ unset FLAGS
unset ARCH
}
@@ -18,17 +26,26 @@ TMPCONF="makepkg_current.conf"
cat "${PWD}/makepkg.d/makepkg.base.conf" > "$TMPCONF"
cat "$CONFDEST" >> "$TMPCONF"
+FLAGS=""
if [ "$EUID" -eq 0 ] ; then
- echo "\033[0;32mPlease run this script as non-root\033[0m"
- exit 3
+ echo "\033[0;32mPlease run this script as non-root\033[0m"
+ exit 3
+fi
+
+if [ -z "$REMOTE_DATABASE" ]; then
+ echo "\033[0;32mYou should specify remote address\033[0m"
+ exit 4
+fi
+
+if [ -n "$FORCE_BUILD_ALL" ]; then
+ FLAGS+="--build_all "
fi
-if [ -z "$1" ]; then
- echo "\033[0;32mYou should specify remote address\033[0m"
- exit 4
+if [ -n "$BUILD_FAIL_FAST" ]; then
+ FLAGS+="--fail_fast "
fi
-curl -fL -o remote.db "$1"
+curl -fL -o remote.db "$REMOTE_DATABASE"
-./uitls/ng/pkgbuild.py remote.db
+./utils/ng/pkgbuild.py remote.db $FLAGS