summaryrefslogtreecommitdiff
path: root/add_package.sh
blob: 98150cbbe8dcf2a6c224b912d968395e9833a815 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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/