From a1aebb641f56a2c970ea9c1bd25bacc4143a578b Mon Sep 17 00:00:00 2001 From: xengineering Date: Thu, 10 Sep 2020 18:11:47 +0200 Subject: Add Utilities --- .gitignore | 2 +- add_package.sh | 24 ++++++++++++++++++++++++ find_package.sh | 8 ++++++++ sign_package.sh | 8 ++++++++ 4 files changed, 41 insertions(+), 1 deletion(-) create mode 100755 add_package.sh create mode 100755 find_package.sh create mode 100755 sign_package.sh diff --git a/.gitignore b/.gitignore index da902ed..6ac69d6 100644 --- a/.gitignore +++ b/.gitignore @@ -3,5 +3,5 @@ repos *.pkg.tar.zst.sig pkg src -add_package.sh deploy.sh +old 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/ + diff --git a/find_package.sh b/find_package.sh new file mode 100755 index 0000000..0fe7410 --- /dev/null +++ b/find_package.sh @@ -0,0 +1,8 @@ +#!/bin/bash + + +PKG_NAME=$1 + + +find . -type f -iname "$PKG_NAME*.pkg.tar.zst" | grep -v "./repos*." + diff --git a/sign_package.sh b/sign_package.sh new file mode 100755 index 0000000..7406f9b --- /dev/null +++ b/sign_package.sh @@ -0,0 +1,8 @@ +#!/bin/bash + + +PKG=$1 + + +gpg -u xengineering --detach-sign -o $PKG.sig $PKG + -- cgit v1.2.3-70-g09d2