From 7e44493866c95ffbce43bee4ae0a38c848e28b2e Mon Sep 17 00:00:00 2001 From: Geert Bevin Date: Sun, 25 Feb 2024 07:51:45 -0500 Subject: [PATCH] Added create.sh and upgrade.sh scripts that rely on curl --- src/scripts/create.sh | 15 +++++++++++++++ src/scripts/upgrade.sh | 15 +++++++++++++++ 2 files changed, 30 insertions(+) create mode 100755 src/scripts/create.sh create mode 100755 src/scripts/upgrade.sh 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