Add -x option to exclude files. #8 #11

This commit is contained in:
Antonin Décimo
2014-08-23 11:10:58 +02:00
parent 5bbf17401a
commit fc063815fb
3 changed files with 8 additions and 1 deletions

View File

@@ -69,6 +69,8 @@ the script will use it to set the game icon on Windows.
Starting with Love 0.8.0, a release is specially available for Windows x64. Starting with Love 0.8.0, a release is specially available for Windows x64.
Starting with Love 0.9.0, Love no longer supports old x86 Macintosh. Starting with Love 0.9.0, Love no longer supports old x86 Macintosh.
`-x` Exclude file or directory.
#### MAC OS X #### MAC OS X
`--maintainer-name` Set the maintainers name. Provide it for OS X CFBundleIdentifier. `--maintainer-name` Set the maintainers name. Provide it for OS X CFBundleIdentifier.

View File

@@ -79,6 +79,9 @@ Set the release directory. By default, a subdirectory called releases is created
Love version. Default is 0.9.1. Love version. Default is 0.9.1.
Starting with Love 0.8.0, a release is specially available for Windows x64. Starting with Love 0.8.0, a release is specially available for Windows x64.
Starting with Love 0.9.0, Love no longer supports old x86 Macintosh. Starting with Love 0.9.0, Love no longer supports old x86 Macintosh.
.TP
.B \-x \fIfile\fR|\fIdirectory\fR
Exclude file or directory.
.SH MAC OS X .SH MAC OS X
.TP .TP
.B \-\-maintainer\-name \fIname\fR .B \-\-maintainer\-name \fIname\fR

View File

@@ -78,7 +78,7 @@ LOVE_GT_090=$(float_test "$LOVE_VERSION_MAJOR >= 0.9")
# Global variables # Global variables
ARGS=( "$@" ) ARGS=( "$@" )
SCRIPT_ARGS="$SCRIPT_ARGS h; n: r: v: config: clean help" SCRIPT_ARGS="$SCRIPT_ARGS h; n: r: v: x: config: clean help"
SCRIPT_ARGS=$(printf '%s\n' $SCRIPT_ARGS | sort -u) SCRIPT_ARGS=$(printf '%s\n' $SCRIPT_ARGS | sort -u)
CONFIG=false CONFIG=false
CONFIG_FILE=config.ini CONFIG_FILE=config.ini
@@ -158,6 +158,8 @@ do
LOVE_VERSION_MAJOR=$(echo "$LOVE_VERSION" | grep -Eo '^[0-9]+\.?[0-9]*') LOVE_VERSION_MAJOR=$(echo "$LOVE_VERSION" | grep -Eo '^[0-9]+\.?[0-9]*')
LOVE_GT_080=$(float_test "$LOVE_VERSION_MAJOR >= 0.8") LOVE_GT_080=$(float_test "$LOVE_VERSION_MAJOR >= 0.8")
LOVE_GT_090=$(float_test "$LOVE_VERSION_MAJOR >= 0.9") LOVE_GT_090=$(float_test "$LOVE_VERSION_MAJOR >= 0.9")
elif [ "$OPTOPT" = "x" ]; then
EXCLUDE_FILES="$OPTARG $EXCLUDE_FILES"
elif [ "$OPTOPT" = "clean" ]; then elif [ "$OPTOPT" = "clean" ]; then
missing_operands=false missing_operands=false
rm -rf "$MAIN_CACHE_DIR" rm -rf "$MAIN_CACHE_DIR"