#!/bin/sh
set -e
dispatch() {
yq ".sources += [\"https://aur.archlinux.org/$1.git\"] |
.environment.pkgbase = \"$1\"
" < build.yml | ssh builds@builds.xdavidwu.link "submit -n$1\ $2 -t aurbuild -t $1"
}
IFS='
'
for i in $(cat vcs.list); do
[ "$(echo "$i" | head -c 1)" = '#' ] && continue
dispatch $i '(vcs)'
done