mirror of https://github.com/Chizi123/Arch-autobuild-repo.git

Chizi123
2020-10-15 735bae3e0d17676430c6484bb1fc482e0cfd87ca
added compression option for packages and repos
2 files modified
11 ■■■■■ changed files
main.sh 8 ●●●● patch | view | raw | blame | history
vars-default.sh 3 ●●●●● patch | view | raw | blame | history
main.sh
@@ -48,7 +48,7 @@
    fi
    #remove old versions before build
    rm *$1*.pkg.tar.*
    rm *$1*
    #make and force rebuild if is git package
    # Mictosoft fonts have problems with checksums and need a seperate argument
@@ -71,7 +71,7 @@
    pkgs=()
    for i in ${pkgname[@]}; do
        #pkgs+=("$i-$pkgver-$pkgrel")
        pkgs+=("$(find . -mindepth 1 -maxdepth 1 -type f -name "$1*.pkg.tar.*" -not -name "*.sig" | sed 's/^\.\///')")
        pkgs+=("$(find . -mindepth 1 -maxdepth 1 -type f -name "$1*.tar.*" -not -name "*.sig" | sed 's/^\.\///')")
    done
    #Move package to repodir and add to repo db
@@ -80,7 +80,7 @@
        if [[ -f $REPODIR/$i ]]; then
            pkgs=${pkgs[@]/$i}
        else
            rm $REPODIR/*$1*.pkg.tar.*
            rm $REPODIR/*$1*
            cp $i $REPODIR/
            [[ "$SIGN" == "Y" ]] && cp $i.sig $REPODIR/
        fi
@@ -106,7 +106,7 @@
        # Wait until package is at the top of the queue and add to db
        if [[ "$(head -n1 $REPODIR/.waitlist)" == "$1" ]]; then
            for i in ${pkgs[@]}; do
                repo-add $([[ "$SIGN" == "Y" ]] && echo "--sign --key $KEY") $REPODIR/$REPONAME.db.tar.xz $REPODIR/$i
                repo-add $([[ "$SIGN" == "Y" ]] && echo "--sign --key $KEY") $REPODIR/$REPONAME.db.tar.$([ -n COMPRESSION ] || echo $COMPRESSION && echo zst) $REPODIR/$i
            done
            while true; do
                if [[ $(cat $REPODIR/.waitlist.lck) == 1 ]]; then
vars-default.sh
@@ -1,6 +1,9 @@
REPODIR=/repo/x86_64
BUILDDIR=/repo/build
REPONAME=
COMPRESSION=zst
export PKGEXT='.pkg.tar.zst'
export SRCEXT='.src.tar.bz2'
export PACKAGER="John Doe <jd@change.me>"
EMAIL=""
UPDATE=N