2
0
Fork 0
mirror of https://github.com/ethauvin/bld.git synced 2025-04-25 00:07:12 -07:00

Added create.sh and upgrade.sh scripts that rely on curl

This commit is contained in:
Geert Bevin 2024-02-25 07:51:45 -05:00
parent e7633b4723
commit 7e44493866
2 changed files with 30 additions and 0 deletions

15
src/scripts/create.sh Executable file
View file

@ -0,0 +1,15 @@
#!/bin/sh
version=$(curl -Ls -o /dev/null -w "%{url_effective}" https://github.com/rife2/bld/releases/latest)
version=${version##*/}
filepath=$(mktemp -u -t "bld-$version.jar")
echo "Downloading bld v$version..."
echo
curl -L -s "https://github.com/rife2/bld/releases/download/$version/bld-$version.jar" -o "$filepath"
echo "Welcome to bld v$version."
java -jar "$filepath" create
rm -f "$filepath"

15
src/scripts/upgrade.sh Executable file
View file

@ -0,0 +1,15 @@
#!/bin/sh
version=$(curl -Ls -o /dev/null -w "%{url_effective}" https://github.com/rife2/bld/releases/latest)
version=${version##*/}
filepath=$(mktemp -u -t "bld-$version.jar")
echo "Downloading bld v$version..."
echo
curl -L -s "https://github.com/rife2/bld/releases/download/$version/bld-$version.jar" -o "$filepath"
echo "Welcome to bld v$version."
java -jar "$filepath" upgrade
rm -f "$filepath"