From 4d47709d338bcc7f3e5501622953a93ca6064bb7 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Thu, 8 Sep 2016 21:08:01 +0200 Subject: [PATCH] bin/owncloud-sync --- bin/owncloud-sync | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/owncloud-sync b/bin/owncloud-sync index 8472851a..a56dbc7b 100755 --- a/bin/owncloud-sync +++ b/bin/owncloud-sync @@ -122,7 +122,12 @@ owncloud_all() { cd "$dir" || continue [ "$VERBOSE" -gt 0 ] && echo "$user: $dir" - su - "$user" -c "$NAME" | sed "s/^/$user /" + + args="" + if [ "$DEBUG" -gt 0 ]; then + echo su - "$user" -c "${NAME}${args}" + fi + su - "$user" -c "${NAME}${args}" | sed "s/^/$user /" done } -- 2.47.3