summaryrefslogtreecommitdiff
path: root/add_package.sh
diff options
context:
space:
mode:
authorxengineering <mail2xengineering@protonmail.com>2020-09-10 18:11:47 +0200
committerxengineering <mail2xengineering@protonmail.com>2020-09-10 18:17:43 +0200
commita1aebb641f56a2c970ea9c1bd25bacc4143a578b (patch)
tree60183cb5508f6aa9facf280ebfa7c77a874bc97b /add_package.sh
parent75f1014c382d78c308c6ac507c1dccf39e9e0820 (diff)
downloadpkgbuilds-a1aebb641f56a2c970ea9c1bd25bacc4143a578b.tar
pkgbuilds-a1aebb641f56a2c970ea9c1bd25bacc4143a578b.tar.zst
pkgbuilds-a1aebb641f56a2c970ea9c1bd25bacc4143a578b.zip
Add Utilities
Diffstat (limited to 'add_package.sh')
-rwxr-xr-xadd_package.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/add_package.sh b/add_package.sh
new file mode 100755
index 0000000..98150cb
--- /dev/null
+++ b/add_package.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+
+REPO=$1
+ARCH=$2
+PKG=$3
+
+PREFIX="repos/$REPO/os/$ARCH"
+DATABASE="$PREFIX/$REPO.db"
+FILESTORAGE="$PREFIX/$REPO.files"
+
+
+# make sure folders exist
+mkdir -p $PREFIX
+
+# add to database and re-sign database
+repo-add $DATABASE.tar.zst $PKG
+gpg -u xengineering --detach-sign -o $DATABASE.sig $DATABASE
+gpg -u xengineering --detach-sign -o $FILESTORAGE.sig $FILESTORAGE
+
+# copy package and signature to repository
+cp $PKG $PREFIX/
+cp $PKG.sig $PREFIX/
+