mirror of
https://github.com/ethauvin/bld.git
synced 2025-04-25 08:17:11 -07:00
Added create.sh and upgrade.sh scripts that rely on curl
This commit is contained in:
parent
e7633b4723
commit
7e44493866
2 changed files with 30 additions and 0 deletions
15
src/scripts/create.sh
Executable file
15
src/scripts/create.sh
Executable 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
15
src/scripts/upgrade.sh
Executable 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"
|
Loading…
Add table
Add a link
Reference in a new issue