Skip to content

Instantly share code, notes, and snippets.

@aerth
Created May 26, 2020 18:47
Show Gist options
  • Save aerth/7c67a9b24d3e71c8edca3d072fb9b6ab to your computer and use it in GitHub Desktop.
Save aerth/7c67a9b24d3e71c8edca3d072fb9b6ab to your computer and use it in GitHub Desktop.
SlackBuild builder (saves to /root/sbos/ and prints the amount of time it took to build)
#!/bin/bash
if [ ! "$USER" = "root" ]; then
echo must run as root
exit 111
fi
if [ ! -f *.info ]; then
echo '*.info not found'
exit 112
fi
if [ ! -f *.SlackBuild ]; then
echo '*.SlackBuild not found'
exit 113
fi
echo Building *.SlackBuild
builder(){
time (. *.info && wget "$DOWNLOAD" && bash *.SlackBuild && echo Build complete)
}
OUTPUT=${OUTPUT-$HOME/sbos/} builder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment