Improve Alpine scripts

This commit is contained in:
MatMoul 2023-11-19 19:13:43 +01:00
parent 7badf3b3bf
commit 3e06129eb1
2 changed files with 27 additions and 0 deletions

27
alpine.sh Normal file
View File

@ -0,0 +1,27 @@
#!/bin/dash
BASE_URL=https://git.netm.ch/m/os-init/raw/branch/main
showHelp() {
echo "alpine.sh"
echo ""
echo "use :"
echo "sh alpine.sh [options]"
echo " -b | --base-url url"
}
main() {
wget -O /tmp/init.sh "${BASE_URL}"/alpine/init.sh
sh /tmp/init.sh -b "${BASE_URL}"
rm /tmp/init.sh
}
while [ ${#} -gt 0 ]; do
case ${1} in
--help) showHelp; exit 0;;
-b | --base-url) BASE_URL="${2}"; shift;;
*) shift;;
esac
done
main