From: Nicolas Boisselier Date: Thu, 8 Sep 2016 19:08:01 +0000 (+0200) Subject: bin/owncloud-sync X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=4d47709d338bcc7f3e5501622953a93ca6064bb7;p=nb.git bin/owncloud-sync --- 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 }