diff --git a/src/scripts/create.sh b/src/scripts/create.sh new file mode 100755 index 0000000..ee1165c --- /dev/null +++ b/src/scripts/create.sh @@ -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" \ No newline at end of file diff --git a/src/scripts/upgrade.sh b/src/scripts/upgrade.sh new file mode 100755 index 0000000..3beffa9 --- /dev/null +++ b/src/scripts/upgrade.sh @@ -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" \ No newline at end of file