Skip to content

Commit

Permalink
make.sh: fix a bug
Browse files Browse the repository at this point in the history
  • Loading branch information
gdh1995 committed Dec 17, 2023
1 parent 5fbf496 commit 3b2f48a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ args="$ZIP_FLAGS $args"

output_for_zip=$output
pushd_err=0
set -x
if [ -n "$ZIP_BASE" ]; then
if [ "${output_for_zip#/}" = "${output_for_zip#[a-zA-Z]:/}" ]; then
output_for_zip=${PWD%/}/${output_for_zip}
Expand All @@ -147,7 +148,7 @@ if ! bool "$WITH_MAP"; then
ZIP_IGNORE=$ZIP_IGNORE' *.map'
fi
if test $btypes == 2; then
ZIP_IGNORE=$ZIP_IGNORE' *.bin _locales/zh_CN'
ZIP_IGNORE=$ZIP_IGNORE' *.bin _locales/zh_CN/'
elif test $btypes == 1; then
ZIP_IGNORE=$ZIP_IGNORE' icons/disable*.png icons/partial*.png'
fi
Expand All @@ -162,6 +163,7 @@ zip -rX -MM $args "$output_for_zip" ${input[@]} -x 'weidu*' 'helpers*' 'test*' '
'*.coffee' '*.crx' '*.enc' '*.log' '*.psd' '*.sh' '*.ts' '*.zip' $ZIP_IGNORE $4
err=$?
[ $pushd_err -eq 0 ] && popd >/dev/null 2>&1
set +x

if [ $err -ne 0 ]; then
echo "$0: exit because of an error during zipping" 1>&2
Expand Down

0 comments on commit 3b2f48a

Please sign in to comment.