diff --git a/installation/resource/installer/bin/common-functions.sh b/installation/resource/installer/bin/common-functions.sh index 8b4e3cffb0879dbf66831e461e6ba6946b529dbc..c5c1c8440a4a6d98fb55be6cfc233f1cb619ae56 100644 --- a/installation/resource/installer/bin/common-functions.sh +++ b/installation/resource/installer/bin/common-functions.sh @@ -31,12 +31,12 @@ executeScriptHooks() } # -# Copies a file (first parameter) to a destination (second parameter). -# Does nothing if file does not exist. +# Copies a file/folder (first parameter) to a destination (second parameter). +# Does nothing if file/folder does not exist. # copyIfExists() { - if [ -f "$1" ]; then + if [ -e "$1" ]; then cp -R "$1" "$2" fi } diff --git a/openbis/dist/admin/common-functions.sh b/openbis/dist/admin/common-functions.sh index c300cecaed4e6b0c4a3d003fa2c7ab6ad664b8fc..c5c1c8440a4a6d98fb55be6cfc233f1cb619ae56 100644 --- a/openbis/dist/admin/common-functions.sh +++ b/openbis/dist/admin/common-functions.sh @@ -31,13 +31,13 @@ executeScriptHooks() } # -# Copies a file (first parameter) to a destination (second parameter). -# Does nothing if file does not exist. +# Copies a file/folder (first parameter) to a destination (second parameter). +# Does nothing if file/folder does not exist. # copyIfExists() { - if [ -f "$1" ]; then - cp "$1" "$2" + if [ -e "$1" ]; then + cp -R "$1" "$2" fi } diff --git a/screening/dist/admin/common-functions.sh b/screening/dist/admin/common-functions.sh index 8b4e3cffb0879dbf66831e461e6ba6946b529dbc..c5c1c8440a4a6d98fb55be6cfc233f1cb619ae56 100644 --- a/screening/dist/admin/common-functions.sh +++ b/screening/dist/admin/common-functions.sh @@ -31,12 +31,12 @@ executeScriptHooks() } # -# Copies a file (first parameter) to a destination (second parameter). -# Does nothing if file does not exist. +# Copies a file/folder (first parameter) to a destination (second parameter). +# Does nothing if file/folder does not exist. # copyIfExists() { - if [ -f "$1" ]; then + if [ -e "$1" ]; then cp -R "$1" "$2" fi }