Skip to content
Snippets Groups Projects
Commit b9cb8ad1 authored by YOSHINO Yoshihito's avatar YOSHINO Yoshihito
Browse files

Revert "xinputrc.common: Implement imconfig_find_files_with_prefixpath_glob as...

Revert "xinputrc.common: Implement imconfig_find_files_with_prefixpath_glob as function to find files"

This reverts commit 9b7d9d06.
parent efabfa4d
No related branches found
No related tags found
No related merge requests found
......@@ -109,27 +109,3 @@ automatic_im () {
autobase_im
fi
}
# imconfig_find_files_with_prefixpath_glob
# check if files exist with given array of strings (shell glob acceptable)
# accept a prefix where "find" is executed on, with a list of strings of
# glob-enabled absolute file path.
# return a string of matched files, using absolute path, separated with
# newline. The string is not ended with newline.
#
# Example:
# imconfig_find_files_with_prefixpath_glob /usr/lib \
# '/usr/lib/*/gtk-2.0/*/im_fcitx.so' \
# '/usr/lib/gtk-2.0/*/im_fcitx.so'
imconfig_find_files_with_prefixpath_glob () {
_PREFIX_PATH="$1"
shift
_RESULT=""
for _STRING_WITH_GLOB in "$@"; do
_TMP_RESULT="$(find "${_PREFIX_PATH}" -path "${_STRING_WITH_GLOB}")"
if [ "x${_TMP_RESULT}" != "x" ]; then
_RESULT="$(printf '%s\n%s' "${_RESULT}" "${_TMP_RESULT}")"
fi
done
printf '%s' "${_RESULT}"
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment