From 40266b3c1e588e773a8216188dff1e95cb88b043 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sun, 7 May 2023 16:57:53 +0200 Subject: [PATCH] add --version option Add a --version option as alternative to the $VERSION environment variable; ./install.sh --version 20.10 # Executing docker install script, commit: + sh -c apt-get update -qq >/dev/null + sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq apt-transport-https ca-certificates curl gnupg >/dev/null debconf: delaying package configuration, since apt-utils is not installed + sh -c install -m 0755 -d /etc/apt/keyrings + sh -c curl -fsSL "https://download.docker.com/linux/ubuntu/gpg" | gpg --dearmor --yes -o /etc/apt/keyrings/docker.gpg + sh -c chmod a+r /etc/apt/keyrings/docker.gpg + sh -c echo "deb [arch=arm64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu jammy stable" > /etc/apt/sources.list.d/docker.list + sh -c apt-get update -qq >/dev/null INFO: Searching repository for VERSION '20.10' INFO: apt-cache madison docker-ce | grep '20.10' | head -1 | awk '{$1=$1};1' | cut -d' ' -f 3 INFO: apt-cache madison docker-ce-cli | grep '20.10' | head -1 | awk '{$1=$1};1' | cut -d' ' -f 3 + sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq docker-ce=5:20.10.24~3-0~ubuntu-jammy docker-ce-cli=5:20.10.24~3-0~ubuntu-jammy containerd.io docker-compose-plugin docker-ce-rootless-extras=5:20.10.24~3-0~ubuntu-jammy >/dev/null Signed-off-by: Sebastiaan van Stijn --- install.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/install.sh b/install.sh index 88cb8d8..d87a28e 100755 --- a/install.sh +++ b/install.sh @@ -55,6 +55,10 @@ while [ $# -gt 0 ]; do mirror="$2" shift ;; + --version) + VERSION="${2#v}" + shift + ;; --*) echo "Illegal option $1" ;;