-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add: linux and MacOS version of the script
- Loading branch information
1 parent
8331c88
commit 8295c30
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/bash | ||
|
||
# Define the paths | ||
testRunnerPath="" | ||
gamePath="" | ||
outputBasePath="" | ||
giantsEditorPath="" | ||
|
||
# Check if the mod folder path is provided | ||
if [ -z "$1" ]; then | ||
echo "Please provide the path to the mod folder." | ||
exit 1 | ||
fi | ||
|
||
modFolderPath="$1" | ||
|
||
# Create the output folder path | ||
modFolderName=$(basename "$modFolderPath") | ||
outputFolderPath="$outputBasePath/${modFolderName}_Output" | ||
|
||
# Check if the output folder already exists, if not, create it | ||
if [ ! -d "$outputFolderPath" ]; then | ||
mkdir -p "$outputFolderPath" | ||
else | ||
# If the output folder exists, append a number to avoid conflicts | ||
counter=1 | ||
while [ -d "$outputFolderPath" ]; do | ||
outputFolderPath="$outputBasePath/${modFolderName}_Output_$counter" | ||
counter=$((counter + 1)) | ||
done | ||
mkdir -p "$outputFolderPath" | ||
fi | ||
|
||
echo "Loading Giants TestRunner located on: $testRunnerPath, with GamePath: $gamePath, and output: $outputFolderPath for mod: $modFolderPath" | ||
|
||
# Build the command | ||
command="$testRunnerPath \"$modFolderPath\" -e \"$giantsEditorPath\" -g \"$gamePath\" --outputPath \"$outputFolderPath\"" | ||
|
||
# Execute the command | ||
eval "$command" |