Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/sh
REPO="${1%/}"
BARCH="$2"
REPO2="${3%/}"
main() {
echo "Calculating packages to build"
local pkgs sect2build tobuild
rm -rf /tmp/pkgs
touch /tmp/pkgs
cd "$REPO2"
for sect2build in $(git shortlog HEAD...3ef77de96bac205112f93774bfd5a7865f851c57 | grep 'add' | awk '{print $2}'); do
if [ -f "$REPO/$sect2build/KagamiBuild" ]; then
case $sect2build in
if [ -z "$(grep -oh $sect2build /tmp/pkgs)" ]; then
echo "$sect2build" >> /tmp/pkgs
fi
esac
fi
done
for sect2build in base kernel utils admin shells net comm devel interpreters perl python lua \
localization text otherosfs database httpd mail doc sound x11 libs misc graphics video audio fonts \
xfce gnome editors metapackages; do
for pkgs in $(ls $REPO | sort | uniq); do
if [ "$(cat $REPO/$pkgs/KagamiBuild | grep '# Section:' | grep -oh $sect2build)" = "$sect2build" ]; then
echo "$pkgs" >>/tmp/pkgs
fi
done
done
for tobuild in $(cat /tmp/pkgs); do
case $tobuild in
rust|cbindgen|icecat|go|ghc|bbl|i3|i3-gaps|qt5)
echo "Skipping build of $tobuild"
echo "$tobuild" >> /tmp/skipped
;;
*)
neko install -n $tobuild
if [ $? != 0 ]; then
echo "$tobuild" >> /tmp/failed
fi
;;
esac
done
for pkgs in i3 i3-gaps; do
pushd "$REPO/$pkgs"
neko build
popd
done
}
main
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.