Skip to content

Commit

Permalink
Replace sed with parameter expansion
Browse files Browse the repository at this point in the history
  • Loading branch information
sonroyaalmerol authored Feb 13, 2024
1 parent 2ead58f commit 2e620fd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/generate-worldoption.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,12 @@ load_palworldsettings() {
echo "WorldOption Generator: Failed to get OptionSettings from PalWorldSettings.ini"
exit 1
fi
config=$(echo "$config" | sed 's/OptionSettings=//; s/,$//' | tr -d '() ')

# Remove "OptionSettings=" and parentheses
config="${config#OptionSettings=}"
config="${config#\(}"
config="${config%\)}"

echo "$config"
}

Expand Down

0 comments on commit 2e620fd

Please sign in to comment.