mirror of
https://github.com/nextcloud/docker.git
synced 2025-04-20 02:46:10 +02:00
Use find
to located *.sh
Signed-off-by: Dennis Vestergaard Værum <github@varum.dk>
This commit is contained in:
parent
37ee8cfdab
commit
98dee55174
1 changed files with 1 additions and 6 deletions
|
@ -26,13 +26,8 @@ run_path() {
|
||||||
|
|
||||||
echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}"
|
echo "=> Searching for scripts (*.sh) to run, located in the folder: ${hook_folder_path}"
|
||||||
|
|
||||||
if [ -z "$(ls -A "${hook_folder_path}")" ]; then
|
|
||||||
echo "==> but the hook folder \"$(basename "${hook_folder_path}")\" is empty, so nothing to do"
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
(
|
(
|
||||||
for script_file_path in "${hook_folder_path}/"*.sh; do
|
find "${hook_folder_path}" -type f -maxdepth 1 -iname '*.sh' -print | sort | while read script_file_path; do
|
||||||
if ! [ -x "${script_file_path}" ] && [ -f "${script_file_path}" ]; then
|
if ! [ -x "${script_file_path}" ] && [ -f "${script_file_path}" ]; then
|
||||||
echo "==> The script \"${script_file_path}\" in the folder \"${hook_folder_path}\" was skipping, because it didn't have the executable flag"
|
echo "==> The script \"${script_file_path}\" in the folder \"${hook_folder_path}\" was skipping, because it didn't have the executable flag"
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Add table
Reference in a new issue