Skip to content

Commit

Permalink
Update install.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
time-killer-games committed Apr 28, 2024
1 parent 1aa2f79 commit afd0c73
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#!/bin/sh

get_latest () {
local release=$(curl --silent "https://api.github.com/repos/$1/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
local release=$(curl -k --silent "https://api.github.com/repos/$1/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
echo "$release"
}

grab_latest() {
# 1 = repo path, 2 = version, 3 = local file
local fileName=$(basename $3)
echo -e "\e[32mAttempting to download $fileName to ${PWD}/$3 from https://github.com/$1/releases/download/$2/$fileName \e[0m"
curl -L -o "$3" "https://github.com/$1/releases/download/$2/$fileName"
curl -k -L -o "$3" "https://github.com/$1/releases/download/$2/$fileName"
}

mkdir -p "plugins/shared"
Expand All @@ -20,7 +20,7 @@ if [ -f "plugins/shared/jna.jar" ]; then
else
jnaJar='https://enigma-dev.org/bin/jna.jar'
echo -e "\e[32mAttempting to download jna.jar to ${PWD}/plugins/shared/jna.jar from $jnaJar \e[0m"
curl -L -o "plugins/shared/jna.jar" "$jnaJar"
curl -k -L -o "plugins/shared/jna.jar" "$jnaJar"
fi

download_latest() {
Expand Down

0 comments on commit afd0c73

Please sign in to comment.