Added additional install script

This commit is contained in:
Donné Napo 2024-06-06 12:57:04 +02:00
parent 67b7dba341
commit 5e5ea0445e
4 changed files with 22 additions and 3 deletions

View File

@ -1,4 +1,4 @@
#!/usr/bin/bash
#!/usr/bin/bash
TARGET=$1

View File

@ -1,4 +1,4 @@
#!/usr/bin/bash
#!/usr/bin/bash
./scripts/build-executable.sh linux-x64
./scripts/build-executable.sh linux-arm

View File

@ -1,4 +1,4 @@
#!/usr/bin/bash
#!/usr/bin/bash
ZIP=$1
if [ -z "$ZIP" ]; then

View File

@ -0,0 +1,19 @@
#!/usr/bin/bash
ZIP=$1
if [ -z "$ZIP" ]; then
echo "The zip file was not provided."
exit 1
fi
TARGET=${ZIP//"m4g-"/}
TARGET=${TARGET//".zip"/}
DIR="/tmp/m4g"
rm -rf "$DIR"
unzip "$ZIP" -d "$DIR"
sudo rm -rf /usr/local/bin/m4g
sudo cp -r "$DIR/bin/Release/net8.0/$TARGET" /usr/local/bin/m4g
mv /usr/share/m4g/MycroForge.CLI /usr/share/m4g/m4g