From 1f5e8e9e79db03dac26df06da4ff6b0e931ebacf 2022-08-21 15:58:51 From: Branko Majic Date: 2022-08-21 15:58:51 Subject: [PATCH] [factorio_development.sh] Include development script in mod directory during initialisation: - Makes it simpler for people to use the scription without having to fetch it from external location. --- diff --git a/games/factorio_development.sh b/games/factorio_development.sh index a17d0a0d484d2706d9450920d850e5749ddb1ec5..ef5cf74c64f4934d840f0a507c7de875b23afeda 100755 --- a/games/factorio_development.sh +++ b/games/factorio_development.sh @@ -22,7 +22,7 @@ set -u PROGRAM="factorio_development.sh" -VERSION="0.0.4" +VERSION="0.0.5" function usage() { cat < "$base_dir/README.md" MOD_TITLE @@ -1053,12 +1061,14 @@ if [[ $COMMAND == init ]]; then MOD_DIRECTORY_PATH="${1-}" shift + DEVELOPMENT_SCRIPT_PATH=$(readlink -f "$0") + if [[ -z $MOD_DIRECTORY_PATH ]]; then error "Mod directory path must be specified." exit "$ERROR_ARGUMENTS" fi - if ! command_init "$MOD_DIRECTORY_PATH"; then + if ! command_init "$MOD_DIRECTORY_PATH" "$DEVELOPMENT_SCRIPT_PATH"; then exit "$ERROR_GENERAL" fi