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

Joel Grunbaum
2020-10-08 88a91e608a78b3521d333313005db2ef6e812cae
Get package names instead of globbing
1 files modified
19 ■■■■ changed files
main.sh 19 ●●●● patch | view | raw | blame | history
main.sh
@@ -66,10 +66,19 @@
        return 1
    fi
    #Get build artifact names
    source PKGBUILD
    pkgs=()
    for i in ${pkgname[@]}; do
        pkgs+=("$i-$pkgver-$pkgrel")
    done
    #Move package to repodir and add to repo db
    rm $REPODIR/*$1*.pkg.tar.??*
    cp *$1*.pkg.tar.?? $REPODIR/
    [[ "$SIGN" == "Y" ]] && cp *$1*.pkg.tar.??.sig $REPODIR/
    for i in ${pkgs[@]}; do
             rm $REPODIR/$i*.pkg.tar.??*
             cp $i*.pkg.tar.?? $REPODIR/
             [[ "$SIGN" == "Y" ]] && cp $i*.pkg.tar.??.sig $REPODIR/
    done
    # Weird exceptions
    if [[ "$1" == "zoom" ]]; then
@@ -90,7 +99,9 @@
    while true; do
        # Wait until package is at the top of the queue and add to db
        if [[ "$(head -n1 $REPODIR/.waitlist)" == "$1" ]]; then
            repo-add $([[ "$SIGN" == "Y" ]] && echo "--sign --key $KEY") $REPODIR/$REPONAME.db.tar.xz $REPODIR/*$1*.pkg.tar.??
            for i in ${pkgs[@]}; do
                repo-add $([[ "$SIGN" == "Y" ]] && echo "--sign --key $KEY") $REPODIR/$REPONAME.db.tar.xz $REPODIR/$i*.pkg.tar.??
            done
            while true; do
                if [[ $(cat $REPODIR/.waitlist.lck) == 1 ]]; then
                    sleep 1