Skip to content

Commit

Permalink
Added create.sh and upgrade.sh scripts that rely on curl
Browse files Browse the repository at this point in the history
  • Loading branch information
gbevin committed Feb 25, 2024
1 parent e7633b4 commit 7e44493
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/scripts/create.sh
Original file line number Diff line number Diff line change
@@ -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 changes: 15 additions & 0 deletions src/scripts/upgrade.sh
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit 7e44493

Please sign in to comment.