| | |
| | | while true; do |
| | | # Wait until package is at the top of the queue and add to db |
| | | if [[ "$(head -n1 $WAITLIST)" == "$1" ]]; then |
| | | # for i in ${pkgs[@]}; do |
| | | repo-add $([[ "$SIGN" == "Y" ]] && echo "--sign --key $KEY") $REPODIR/$REPONAME.db.tar.$([ -n "$COMPRESSION" ] || echo $COMPRESSION && echo zst) ${pkgs[@]} |
| | | # done |
| | | while true; do |
| | | if [[ $(cat $WAITLIST_LCK) == 1 ]]; then |
| | | sleep 1 |
| | |
| | | #Adding build dependencies is |
| | | # Usage: add [package name] |
| | | function add { |
| | | echo @: $@ |
| | | # read |
| | | local i j k |
| | | for i in $@; do |
| | | cd $BUILDDIR |
| | |
| | | local makedeps |
| | | source PKGBUILD |
| | | |
| | | #check for all build dependencies |
| | | #Check for all build dependencies |
| | | for j in ${makedepends[@]}; do |
| | | k=$(echo $j | sed 's/[>]=.*//g') |
| | | if ! pacman -Si $k; then |
| | |
| | | makedeps+=($k) |
| | | fi &>/dev/null |
| | | done |
| | | echo $i: ${makedeps[@]} |
| | | # read |
| | | |
| | | #Add dependencies and update so overall build can work |
| | | for j in ${makedeps[@]}; do |
| | | add $j |
| | | # read |
| | | done |
| | | echo $i: ${makedeps[@]} |
| | | # read |
| | | if [[ -n "${makedeps[@]}" ]]; then |
| | | sudo pacman -Sy |
| | | fi |
| | | #read |
| | | |
| | | #Actually build wanted package |
| | | cd $BUILDDIR/$i |
| | | build_pkg $i -f |
| | |
| | | rm -f $TMPFILE |
| | | } |
| | | |
| | | #Check helper function |
| | | function check_pkg { |
| | | if [[ -z "$(curl -sI "https://aur.archlinux.org/packages/$2" | head -n1 | grep 200)" ]]; then |
| | | echo "$2" >> $1 |