From fb610620dab44925e75d96a2d6e170dc8a28ce8b Mon Sep 17 00:00:00 2001 From: MatMoul Date: Sun, 19 Nov 2023 18:58:42 +0100 Subject: [PATCH] Improve Alpine scripts --- alpine.sh | 26 ++++++++++++++++++++++++++ alpine/{alpine.sh => init.sh} | 0 2 files changed, 26 insertions(+) create mode 100644 alpine.sh rename alpine/{alpine.sh => init.sh} (100%) diff --git a/alpine.sh b/alpine.sh new file mode 100644 index 0000000..fc76b68 --- /dev/null +++ b/alpine.sh @@ -0,0 +1,26 @@ +#!/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 "${BASE_URL}"/alpine/init.sh + sh init.sh +} + +while [ ${#} -gt 0 ]; do + case ${1} in + --help) showHelp; exit 0;; + -b | --base-url) BASE_URL="${2}"; shift;; + *) shift;; + esac +done + +main diff --git a/alpine/alpine.sh b/alpine/init.sh similarity index 100% rename from alpine/alpine.sh rename to alpine/init.sh