Skip to content

Instantly share code, notes, and snippets.

@vasi
Created April 11, 2024 03:16
Show Gist options
  • Save vasi/d04341bb760a697aa040ec49f5ba6210 to your computer and use it in GitHub Desktop.
Save vasi/d04341bb760a697aa040ec49f5ba6210 to your computer and use it in GitHub Desktop.
Script to build and install with poudriere
#!/bin/sh
cp ~vasi/poudriere.list ~vasi/poudriere.list.bak
cp ~vasi/poudriere.list ~vasi/.poudriere.list.tmp
for i in "$@"; do
if ! echo "$i" | grep -q /; then
echo "$i does not have a category!"
exit 1
fi
echo "$i" >> ~vasi/.poudriere.list.tmp
done
perl -ne '$H{$_}++ or print' < ~vasi/.poudriere.list.tmp > ~vasi/poudriere.list
chown vasi ~vasi/poudriere.list*
poudriere bulk -j default -f ~vasi/poudriere.list
pkg install -y "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment