aboutsummaryrefslogtreecommitdiff
path: root/utils/ng/pkgbuild_bootstrap
diff options
context:
space:
mode:
Diffstat (limited to 'utils/ng/pkgbuild_bootstrap')
-rwxr-xr-xutils/ng/pkgbuild_bootstrap43
1 files changed, 43 insertions, 0 deletions
diff --git a/utils/ng/pkgbuild_bootstrap b/utils/ng/pkgbuild_bootstrap
new file mode 100755
index 0000000..a510c53
--- /dev/null
+++ b/utils/ng/pkgbuild_bootstrap
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+set -Eeo pipefail
+trap cleanup SIGINT SIGTERM ERR EXIT
+
+cleanup() {
+ trap - SIGINT SIGTERM ERR EXIT
+ unset SIGNING_ARG
+ unset UNSUCCESSFUL
+ unset SKIP_VERIFIED
+ unset FOLDER_NAME
+ unset PKGDEST
+ unset SRCDEST
+ unset CONFDEST
+ unset REPO_DEST
+ unset TMPCONF
+ unset REPO_PENDING
+ unset REPO_DIFF
+ unset PKGBUILD_DIRECTORY_BASE
+ unset ARCH
+}
+
+ARCH=$(uname -m)
+CONFDEST="${PWD}/makepkg.d/makepkg.$ARCH.conf"
+
+TMPCONF="makepkg_current.conf"
+cat "${PWD}/makepkg.d/makepkg.base.conf" > "$TMPCONF"
+cat "$CONFDEST" >> "$TMPCONF"
+
+
+if [ "$EUID" -eq 0 ] ; then
+ echo "\033[0;32mPlease run this script as non-root\033[0m"
+ exit 3
+fi
+
+if [ -z "$1" ]; then
+ echo "\033[0;32mYou should specify remote address\033[0m"
+ exit 4
+fi
+
+curl -fL -o remote.db "$1"
+
+./uitls/ng/pkgbuild.py remote.db