Fix while condition for non existing files

This commit is contained in:
Arnie 2017-12-25 08:41:17 +01:00
parent d9163bcff8
commit e664352139

View File

@ -15,37 +15,37 @@ DRY_RUN=0
__initVariables() { __initVariables() {
# Loop over parameters and set the variables # Loop over parameters and set the variables
while [[ ${#} -gt 0 ]]; do while [[ ${#} -gt 0 ]]; do
case "${1}" in case "${1}" in
--dry-run) --dry-run)
DRY_RUN=1 DRY_RUN=1
;; ;;
*.css|*.scss|*.sass|*.less) *.css|*.scss|*.sass|*.less)
__path_exists "${1}" __path_exists "${1}"
if [[ $? -ne 0 ]]; then if [[ $? -ne 0 ]]; then
__err "Specified path does not exist: ${1}" __err "Specified path does not exist: ${1}"
continue else
CSS_FILES+=(${1})
fi fi
CSS_FILES+=(${1})
;; ;;
*.js|*.jsx) *.js|*.jsx)
__path_exists "${1}" __path_exists "${1}"
if [[ $? -ne 0 ]]; then if [[ $? -ne 0 ]]; then
__err "Specified path does not exist: ${1}" __err "Specified path does not exist: ${1}"
continue else
JS_FILES+=(${1})
fi fi
JS_FILES+=(${1})
;; ;;
*.php|*.phtml) *.php|*.phtml)
__path_exists "${1}" __path_exists "${1}"
if [[ $? -ne 0 ]]; then if [[ $? -ne 0 ]]; then
__err "Specified path does not exist: ${1}" __err "Specified path does not exist: ${1}"
continue else
PHP_FILES+=(${1})
fi fi
PHP_FILES+=(${1})
;; ;;
esac esac
shift 1 shift 1
done done
} }