无法忽略使用 zip 的目录

无法忽略使用 zip 的目录

我有这个命令:

#!/usr/bin/env bash

set -eo pipefail
cd "$(dirname "$(dirname "$BASH_SOURCE")")"

zip -9 -r zips/function.zip . \
 -x '*.git*' -x '*.idea*' -x '*.idea*' \
 -x */node_modules/typescript/*  \
 -x */zips/* -x '*.zip' -x */node_modules/puppeteer/*

由于某种原因,我在输出中得到了这个:

updating: node_modules/typescript/loc/lcl/PTB/Targets/ (stored 0%)
updating: node_modules/typescript/loc/lcl/PTB/Targets/ProjectItemsSchema.xaml.lcl (deflated 63%)
updating: node_modules/typescript/loc/lcl/PTB/Targets/TypeScriptProjectProperties.xaml.lcl (deflated 90%)
updating: node_modules/typescript/loc/lcl/PTB/Targets/TypeScriptCompile.xaml.lcl (deflated 86%)

所以我猜

*/node_modules/typescript/*

不忽略:

node_modules/typescript

相关内容