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

Joel Grunbaum
2020-10-08 88a91e608a78b3521d333313005db2ef6e812cae
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
@@ -219,7 +230,7 @@
   echo "To: $EMAIL"
   echo "Subject: Build errors"
   echo "There were build errors for the build of $REPONAME at $(date), please address them soon."
   echo "The errors were: $1"
   echo "The errors were: $@"
   ) | sendmail -t
}