projects
/
shutils.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bib2html: Sanitize bibentry sort without month
[shutils.git]
/
nextcloud
/
nextcloud-inotify-sync
diff --git
a/nextcloud/nextcloud-inotify-sync
b/nextcloud/nextcloud-inotify-sync
index e310352443ef34996c8b20bc61b0bf961c1fe2e9..d1249048cbb35390f375ad00c7a8f304967608b4 100755
(executable)
--- 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:
netrc for login.
Usage:
- $0 [OPTIONS] source_dir server_url
+ $0 [OPTIONS] source_dir server_url
[ARGS...]
$0 -h
OPTIONS:
$0 -h
OPTIONS:
@@
-30,9
+30,10
@@
OPTIONS:
-s Silent, be less verbose
-t SECS Sync period if nothing changed locally.
Default: 180
-s Silent, be less verbose
-t SECS Sync period if nothing changed locally.
Default: 180
+ ARGS Passed to nextcloudcmd
EXAMPLE
EXAMPLE
- $0 ~/.vimwiki https://cloud.example.com
/remote.php/webdav/
vimwiki
+ $0 ~/.vimwiki https://cloud.example.com
--path
vimwiki
EOF
}
EOF
}
@@
-41,7
+42,7
@@
IWAIT_OPTS=""
SILENT=0
ONESHOT=0
SILENT=0
ONESHOT=0
-PERIOD=
18
0
+PERIOD=
60
0
while getopts "host:" OPTION; do
case "${OPTION}" in
while getopts "host:" OPTION; do
case "${OPTION}" in
@@
-70,6
+71,8
@@
shift $((OPTIND-1))
SOURCE_DIR=$1
SERVER_URL=$2
SOURCE_DIR=$1
SERVER_URL=$2
+shift
+shift
if [ -z "${SOURCE_DIR}" ] ; then
echo "No source directory given."
if [ -z "${SOURCE_DIR}" ] ; then
echo "No source directory given."
@@
-83,7
+86,7
@@
if [ -z "${SERVER_URL}" ] ; then
exit 1
fi
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..."
while true; do
echo "About to sync..."