refactoring / code simplification

Thanks to @marmarek for the suggestion!
This commit is contained in:
Patrick Schleizer 2016-01-08 00:36:26 +00:00
parent e9fca8fb9f
commit f4d367a6a7
No known key found for this signature in database
GPG Key ID: CB8D50BB77BB3C48

View File

@ -94,14 +94,8 @@ bind_dirs() {
fi
# Initially copy over data directories to /rw if rw directory does not exist.
if [ -d "$fso_ro" ]; then
if [ ! -d "$fso_rw" ]; then
cp --archive --recursive --parents "$fso_ro" "$rw_dest_dir"
fi
elif [ -f "$fso_ro" ]; then
if [ ! -f "$fso_rw" ]; then
cp --archive --recursive --parents "$fso_ro" "$rw_dest_dir"
fi
if [ -d "$fso_ro" ] || [ -f "$fso_ro" ]; then
cp --verbose --no-clobber --archive --recursive --parents "$fso_ro" "$rw_dest_dir"
else
true "$fso_ro is neither a directory nor a file or does not exist, skipping."
continue