1
0
mirror of https://github.com/veden/Rampant.git synced 2025-03-17 20:58:35 +02:00

FACTO-277: Cleanup build script

This commit is contained in:
Aaron Veden 2023-04-01 09:42:38 -07:00
parent 4b01779cab
commit ce135de257
No known key found for this signature in database
GPG Key ID: FF5990B1C6DD3F84

View File

@ -16,12 +16,6 @@ if test $_flag_help
return 0
end
function getTitle
set title (jq -r .title info.json)
set ver (jq -r .version info.json)
echo $title"_"$ver
end
function copyFiles --argument-names copyFolder
mkdir -p $copyFolder
@ -44,16 +38,18 @@ if test -z "$modFolder"
set modFolder "/mnt/gallery/gameFiles/factorio/mods"
end
set title (getTitle)
set modName "Rampant"
set modName (jq -r .name info.json)
set modVersion (jq -r .version info.json)
set title $modName"_"$modVersion
set zipName "$modFolder/$title.zip"
set modPath "$modFolder/$title"
switch $argv[1]
case copy
echo "copying"
set zipName "$modFolder/$title.zip"
rm -f zipName
rm -f $zipName
copyFiles "$modFolder/$title"
copyFiles $modPath
if test -n "$_flag_serverDir"
copyFiles $_flag_serverDir
@ -62,9 +58,8 @@ switch $argv[1]
if test -z "$_flag_silent"
echo "zipping"
end
set zipName "$modFolder/$title.zip"
rm -rf "$modFolder/$title"
rm -f zipName
rm -rf $modPath
rm -f $zipName
ln -s (pwd) $title
set zipProgress (zip $zipName \