mirror of
https://github.com/meienberger/runtipi.git
synced 2024-09-19 07:58:01 +03:00
feat(scripts): helper script to update from 2.x to 3.x
This commit is contained in:
parent
de7632d270
commit
59e500c665
29
scripts/update-2.0.0-to-3.0.0.sh
Executable file
29
scripts/update-2.0.0-to-3.0.0.sh
Executable file
@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env bash
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
ARCHITECTURE="$(uname -m)"
|
||||
|
||||
ASSET="runtipi-cli-linux-x86_64.tar.gz"
|
||||
if [[ "$ARCHITECTURE" == "arm64" || "$ARCHITECTURE" == "aarch64" ]]; then
|
||||
ASSET="runtipi-cli-linux-aarch64.tar.gz"
|
||||
fi
|
||||
|
||||
URL="https://github.com/runtipi/runtipi/releases/download/v3.0.0/$ASSET"
|
||||
|
||||
rm -f ./runtipi-cli
|
||||
|
||||
if [[ "$ASSET" == *".tar.gz" ]]; then
|
||||
curl --location "$URL" -o ./runtipi-cli.tar.gz
|
||||
tar -xzf ./runtipi-cli.tar.gz
|
||||
|
||||
asset_name=$(tar -tzf ./runtipi-cli.tar.gz | head -n 1 | cut -f1 -d"/")
|
||||
mv "./${asset_name}" ./runtipi-cli
|
||||
rm ./runtipi-cli.tar.gz
|
||||
else
|
||||
curl --location "$URL" -o ./runtipi-cli
|
||||
fi
|
||||
|
||||
chmod +x ./runtipi-cli
|
||||
sudo ./runtipi-cli start
|
Loading…
Reference in New Issue
Block a user