diff --git a/chopin.sh b/chopin.sh index d19f615..6027b37 100755 --- a/chopin.sh +++ b/chopin.sh @@ -18,13 +18,14 @@ # along with this program. If not, see . name="Application" -EXCLUDE_PATHS="chopin.sh/ webxdc.js LICENSE README *.sh *.md *.xdc *~" +EXCLUDE_PATHS="chopin.sh/* chopin.sh/.* webxdc.js LICENSE README *.sh *.md *.xdc *~" usage() { echo "Usage: ${0} [-hfgp] [-e PATH]" echo " -h Display this message." echo " -e [PATH] Filename or folder to exclude from package. For several" echo " files or folders, use this flag several times with one argument." + echo " If you want to exclude an entire directory, do it like this: \"dir/*\"" echo " -f Lint and format all source files." echo " -g Add pre-commit hook which formats and lints code." echo " -x Pack files as-is, without optimizing. Use this flag before the -p" @@ -127,13 +128,14 @@ webxdc_pack() { } [[ "$#" -eq 0 ]] && usage -while getopts ":h:egxpf" option; do +while getopts "he:gxpf" option; do case ${option} in h) usage ;; e) EXCLUDE_PATHS+=" ${OPTARG}" + echo $EXCLUDE_PATHS ;; f) lint_and_format