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

Chizi123
2020-10-15 ca0d8a2ab391bf8dd1a40635d8755ab428bb1f4c
main.sh
@@ -173,13 +173,30 @@
}
#Add a new package to be built
#There is no name checking so be sure to put in the name correctly
#Adding build dependencies is
# Usage: add [package name]
function add {
   for i in $@; do
      cd $BUILDDIR
      if [[ -z $(git ls-remote https://aur.archlinux.org/$i.git) ]]; then
         echo "Not a package"
         exit 2
      fi
      git clone https://aur.archlinux.org/$i.git
      cd $i
      #check for all build dependencies
      for i in ${makedepends[@]}; do
         if pacman -Si $i; then
            makedepends=${makedepends[@]/$delete}
         fi &>/dev/null
      done
      for i in ${makedepends[@]}; do
         add $i
      done
      sudo pacman -Sy
      #Actually build wanted package
      build_pkg $i -f
   done
   return 0