From dd8f6b3e0744f987dc8cf3694b13cb38559e8e87 Mon Sep 17 00:00:00 2001 From: Alain Reguera Delgado Date: Jan 10 2014 03:52:37 +0000 Subject: Update tcar automation scripts. - Previously, some calls to tcar_getFilesList function were using options in the long form but tcar_getFiles is using short options form. This make find to fail with 'invalid predicate' error. This update changes the calls of tcar_getFilesList function to use short options instead of long options. --- diff --git a/Scripts/Modules/Locale/Modules/Directories/directories.sh b/Scripts/Modules/Locale/Modules/Directories/directories.sh index 6ba3131..5284026 100755 --- a/Scripts/Modules/Locale/Modules/Directories/directories.sh +++ b/Scripts/Modules/Locale/Modules/Directories/directories.sh @@ -63,13 +63,10 @@ function directories { # Build list of supported files which locale module will extract # translatable strings from. if [[ ${LOCALE_FLAG_RECURSIVE} == 'true' ]];then - FILES=$(tcar_getFilesList ${DIRECTORY} \ - --type=f --pattern="${LOCALE_SUPPORTED_FILES}" \ + FILES=$(tcar_getFilesList -t 'f' -p "${LOCALE_SUPPORTED_FILES}" ${DIRECTORY} \ | egrep "${TCAR_FLAG_FILTER}") else - FILES=$(tcar_getFilesList ${DIRECTORY} \ - --mindepth=1 --maxdepth=1 --type=f \ - --pattern="${LOCALE_SUPPORTED_FILES}" \ + FILES=$(tcar_getFilesList -i 1 -a 1 -t 'f' -p "${LOCALE_SUPPORTED_FILES}" ${DIRECTORY} \ | egrep "${TCAR_FLAG_FILTER}") fi diff --git a/Scripts/Modules/Locale/Modules/Files/Modules/Update/Modules/Sh/sh.sh b/Scripts/Modules/Locale/Modules/Files/Modules/Update/Modules/Sh/sh.sh index a4f2b61..83b3f25 100755 --- a/Scripts/Modules/Locale/Modules/Files/Modules/Update/Modules/Sh/sh.sh +++ b/Scripts/Modules/Locale/Modules/Files/Modules/Update/Modules/Sh/sh.sh @@ -43,12 +43,9 @@ function sh { # translatable strings inside. By default only scripts in the # current directory will be looked out. if [[ ${LOCALE_FLAG_RECURSIVE} == 'true' ]];then - FILES=$(tcar_getFilesList "${DIRECTORY}" \ - --type=f --pattern='.+\.sh$') + FILES=$(tcar_getFilesList -t 'f' -p '.+\.sh$' "${DIRECTORY}") else - FILES=$(tcar_getFilesList "${DIRECTORY}" \ - --mindepth=1 --maxdepth=1 --type=f \ - --pattern='.+\.sh$') + FILES=$(tcar_getFilesList -i '1' -a '1' -t 'f' -p '.+\.sh$' "${DIRECTORY}") fi # Verify found files existence and type before processing them. diff --git a/Scripts/Modules/Render/Modules/Directories/directories.sh b/Scripts/Modules/Render/Modules/Directories/directories.sh index 573d312..3f22b1a 100755 --- a/Scripts/Modules/Render/Modules/Directories/directories.sh +++ b/Scripts/Modules/Render/Modules/Directories/directories.sh @@ -29,11 +29,9 @@ function directories { local DIRECTORY=$(tcar_checkWorkDirSource "${1}") - local CONFIGURATION_FILES=$(tcar_getFilesList ${DIRECTORY} \ - --pattern=".+/.+\.conf$" --type='f') + local CONFIGURATION_FILES=$(tcar_getFilesList -p '.+/.+\.conf$' -t 'f' ${DIRECTORY}) - local CONFIGURATION_SYMLINKS=$(tcar_getFilesList ${DIRECTORY} \ - --pattern=".+/.+\.conf$" --type='l') + local CONFIGURATION_SYMLINKS=$(tcar_getFilesList -p '.+/.+\.conf$' -t 'l' ${DIRECTORY}) local CONFIGURATIONS="${CONFIGURATION_FILES} ${CONFIGURATION_SYMLINKS}" diff --git a/Scripts/Modules/Tuneup/tuneup.sh b/Scripts/Modules/Tuneup/tuneup.sh index 94e5b93..1d8b05a 100755 --- a/Scripts/Modules/Tuneup/tuneup.sh +++ b/Scripts/Modules/Tuneup/tuneup.sh @@ -42,9 +42,8 @@ function tuneup { if [[ -f ${ARGUMENT} ]];then local FILES=${ARGUMENT} elif [[ -d ${ARGUMENT} ]];then - local FILES=$(tcar_getFilesList ${ARGUMENT} \ - --pattern=".+${FILE_EXTENSION_REGEX}" \ - --type='f' | egrep ${TCAR_FLAG_FILTER}) + local FILES=$(tcar_getFilesList -p ".+${FILE_EXTENSION_REGEX}" -t 'f' ${ARGUMENT} \ + | egrep ${TCAR_FLAG_FILTER}) else tcar_printMessage "`gettext "The argument provided isn't valid."`" --as-error-line fi