diff --git a/install.sh b/install.sh index 061f8c3..9df28c0 100755 --- a/install.sh +++ b/install.sh @@ -1,12 +1,6 @@ #!/bin/bash set -e -# Require root -if [[ $EUID -ne 0 ]]; then - echo "This script must be run as root." >&2 - exit 1 -fi - # Installs bb64 on the local machine. # 1. determines the architecture of the local machine # 2. downloads the appropriate bb64 binary from the latest public release on Gitea (https://gitea.jde.nz/j/bb64/releases) @@ -54,7 +48,8 @@ chmod +x "$TMPDIR/bb64" # 5. Move to /usr/local/bin # ----------------------------------------------------------------------------- -mv "$TMPDIR/bb64" /usr/local/bin/bb64 +docker run --rm -v "$TMPDIR:/tmp" -v /usr/local/bin:/target alpine sh -c "cp /tmp/bb64 /target/bb64" +rm "$TMPDIR/bb64" # 6. Print success message # ----------------------------------------------------------------------------- diff --git a/version.h b/version.h index 0af29b1..9fdd53b 100644 --- a/version.h +++ b/version.h @@ -1 +1 @@ -static const char *VERSION = "11"; +static const char *VERSION = "12";