From e7916d469b03380b5636e3296c4e3ab037ef2572 Mon Sep 17 00:00:00 2001 From: "Helmut K. C. Tessarek" Date: Sun, 6 Oct 2019 17:22:40 -0400 Subject: [PATCH] jnclnst: add comments --- jnclnst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jnclnst b/jnclnst index 51f133a..0b54d52 100755 --- a/jnclnst +++ b/jnclnst @@ -1,6 +1,6 @@ #!/usr/bin/env bash -VERSION=1.0.0 +VERSION=1.0.1 BASH=`which bash` BASH_VERSION=`$BASH --version |head -1 |sed 's/.*version \(.*\)-release.*/\1/' |cut -c 1` @@ -243,7 +243,7 @@ fi debug "Joplin sync target: $JOPLIN_SYNC_TARGET" RESDIR=${JOPLIN_SYNC_TARGET}/.resource -# retrieve the IDs of orphaned resources from the database +# retrieve the IDs of valid resources from the database sqlite3 $DB "select id from resources" >$VALID_RESOURCES if [ ! -s "$VALID_RESOURCES" ]; then @@ -279,6 +279,7 @@ do if [ ${VALID[$f]+_} ]; then info "Keeping resource id: $f" else + # if the file exists at the target, but is not in the database, we will delete it info_n "Deleting resource id: $f" if [ "$nflag" == "0" ]; then echo $f >>$DELETE_RESOURCES