mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-23 16:57:40 +00:00
maint(common): Treat -x@filename as another flag
This commit is contained in:
parent
416fa5fa15
commit
2ba656d89a
1 changed files with 3 additions and 9 deletions
|
|
@ -23,16 +23,10 @@ function zip_files() {
|
|||
shift
|
||||
|
||||
# Parse rest of parameters
|
||||
EXCLUDE=
|
||||
FLAGS=()
|
||||
INCLUDE=()
|
||||
while [[ $# -gt 0 ]] ; do
|
||||
case "$1" in
|
||||
-x@*)
|
||||
# filename of files to exclude
|
||||
EXCLUDE="$1"
|
||||
shift
|
||||
;;
|
||||
-*)
|
||||
# zip/7z flags
|
||||
FLAGS+=($1)
|
||||
|
|
@ -60,14 +54,14 @@ function zip_files() {
|
|||
;;
|
||||
esac
|
||||
|
||||
# 7z command
|
||||
# 7z command to add files
|
||||
COMPRESS_CMD="${SEVENZ}"
|
||||
SEVENZ_CMD="a"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Create archive
|
||||
builder_echo_debug "${COMPRESS_CMD} ${SEVENZ_CMD} ${FLAGS[@]} ${ZIP_FILE} ${INCLUDE[@]} ${EXCLUDE}"
|
||||
"${COMPRESS_CMD}" ${SEVENZ_CMD} ${FLAGS[@]} ${ZIP_FILE} ${INCLUDE[@]} ${EXCLUDE}
|
||||
builder_echo_debug "${COMPRESS_CMD} ${SEVENZ_CMD} ${FLAGS[@]} ${ZIP_FILE} ${INCLUDE[@]}"
|
||||
"${COMPRESS_CMD}" ${SEVENZ_CMD} ${FLAGS[@]} ${ZIP_FILE} ${INCLUDE[@]}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue