Skip to content

Instantly share code, notes, and snippets.

@Johnnynator
Last active July 30, 2018 17:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Johnnynator/64efb26f36af518ced103c2ade9196ae to your computer and use it in GitHub Desktop.
Save Johnnynator/64efb26f36af518ced103c2ade9196ae to your computer and use it in GitHub Desktop.
#!/bin/bash
./xbps-src binary-bootstrap
/bin/echo -e '\x1b[32mChanged packages:\x1b[0m'
git diff --name-status master...HEAD | grep "^[AM].*srcpkgs/[^/]*/template$" | cut -d/ -f 2 | tee /tmp/templates | sed "s/^/ /" >&2
PKGS="$(./xbps-src sort-dependencies $(cat /tmp/templates))"
PKGS="${PKGS/\=\> Using*repository./}"
echo $PKGS
for pkg in ${PKGS}; do
./xbps-src -Et pkg "$pkg"
[ $? -eq 1 ] && exit 1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment