X-Git-Url: http://git.sthu.org/?a=blobdiff_plain;f=nextcloud%2Fnextcloud-inotify-sync;h=d1249048cbb35390f375ad00c7a8f304967608b4;hb=9ff084ff106b955d5dcc9ceb3b31ba4c1f0d46c5;hp=e310352443ef34996c8b20bc61b0bf961c1fe2e9;hpb=6290d123b8a650fb1d8695cf098103502ff14d46;p=shutils.git diff --git a/nextcloud/nextcloud-inotify-sync b/nextcloud/nextcloud-inotify-sync index e310352..d124904 100755 --- a/nextcloud/nextcloud-inotify-sync +++ b/nextcloud/nextcloud-inotify-sync @@ -21,7 +21,7 @@ after some period, whatever happens first. The nextcloudcmd is called with netrc for login. Usage: - $0 [OPTIONS] source_dir server_url + $0 [OPTIONS] source_dir server_url [ARGS...] $0 -h OPTIONS: @@ -30,9 +30,10 @@ OPTIONS: -s Silent, be less verbose -t SECS Sync period if nothing changed locally. Default: 180 + ARGS Passed to nextcloudcmd EXAMPLE - $0 ~/.vimwiki https://cloud.example.com/remote.php/webdav/vimwiki + $0 ~/.vimwiki https://cloud.example.com --path vimwiki EOF } @@ -41,7 +42,7 @@ IWAIT_OPTS="" SILENT=0 ONESHOT=0 -PERIOD=180 +PERIOD=600 while getopts "host:" OPTION; do case "${OPTION}" in @@ -70,6 +71,8 @@ shift $((OPTIND-1)) SOURCE_DIR=$1 SERVER_URL=$2 +shift +shift if [ -z "${SOURCE_DIR}" ] ; then echo "No source directory given." @@ -83,7 +86,7 @@ if [ -z "${SERVER_URL}" ] ; then exit 1 fi -NCC_OPTS="${NCC_OPTS} ${SOURCE_DIR} ${SERVER_URL}" +NCC_OPTS="${NCC_OPTS} $@ ${SOURCE_DIR} ${SERVER_URL}" while true; do echo "About to sync..."