mirror of
https://github.com/keymanapp/keyman.git
synced 2026-10-29 01:07:49 +00:00
maint(common): Handle exclude filenames
This commit is contained in:
parent
8566b7b037
commit
8e73f1be15
1 changed files with 6 additions and 6 deletions
|
|
@ -71,7 +71,7 @@ function zip_files() {
|
|||
done
|
||||
|
||||
COMPRESS_CMD=zip
|
||||
IGNORE=
|
||||
IGNORE=()
|
||||
if ! command -v zip 2>&1 > /dev/null; then
|
||||
# Fallback to 7z
|
||||
if [[ -z "${SEVENZ+x}" ]]; then
|
||||
|
|
@ -89,20 +89,20 @@ function zip_files() {
|
|||
|
||||
for ignoreFile in "${EXCLUDE[@]}"
|
||||
do
|
||||
IGNORE+= ' -xr!${ignoreFile}'
|
||||
IGNORE+=" -xr!${ignoreFile}"
|
||||
done
|
||||
# 7z command, excluding build.sh files
|
||||
"${SEVENZ}" ${FLAGS[@]} ${ZIP_FILE} ${INCLUDE[@]} ${IGNORE}
|
||||
"${SEVENZ}" ${FLAGS[@]} ${ZIP_FILE} ${INCLUDE[@]} ${IGNORE[@]}
|
||||
fi
|
||||
else
|
||||
|
||||
for ignoreFile in "${EXCLUDE[@]}"
|
||||
do
|
||||
IGNORE+= ' -x ${ignoreFile}'
|
||||
IGNORE+=" -x \\*\\*/${ignoreFile}"
|
||||
done
|
||||
# zip command, excluding build.sh files
|
||||
echo ${COMPRESS_CMD} ${FLAGS[@]} ${ZIP_FILE} ${INCLUDE[@]} ${IGNORE}
|
||||
exit
|
||||
echo ${COMPRESS_CMD} ${FLAGS[@]} ${ZIP_FILE} ${INCLUDE[@]} ${IGNORE[@]}
|
||||
${COMPRESS_CMD} ${FLAGS[@]} ${ZIP_FILE} ${INCLUDE[@]} ${IGNORE[@]}
|
||||
fi
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue