Current location

narf Source control manager Git

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Mehani <shtrom@ssji.net>2021-09-01 14:38:29 +0200
committerOlivier Mehani <shtrom@ssji.net>2021-09-01 14:38:57 +0200
commit24680ef92b11b5595cee2e374cdca3788f180b4e (patch)
tree122cae708e4118700e21d4dd681926f502b1abc7
parent8510aec780a5e9724e6cf06434d33dc9312483c3 (diff)
[titanium-backup] fixes
Signed-off-by: Olivier Mehani <shtrom@ssji.net>
-rwxr-xr-xopenbsd/titanium-cleanup.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/openbsd/titanium-cleanup.sh b/openbsd/titanium-cleanup.sh
index 19bff18..f3b264b 100755
--- a/openbsd/titanium-cleanup.sh
+++ b/openbsd/titanium-cleanup.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# A quick script to delete all but the most recent backup for each app
# from Titanium Backup
#
@@ -12,6 +12,9 @@
BACKUPPATH=${1}
+PHP=/usr/local/bin/php-7.3
+OCC=/srv/www/nextcloud/occ
+
cd ${BACKUPPATH}
PACKAGES=$(ls *.apk.*| sed s/-.*// | sort -u )
@@ -24,4 +27,5 @@ for PKG in ${PACKAGES}; do
test -n "${FILES}" && rm ${FILES}
COUNT=$((COUNT + $(echo ${FILES} | wc -w)))
done
+test ${COUNT} -gt 0 && ${PHP} ${OCC} files:scan -p "${BACKUPPATH#*/data}"
test ${COUNT} -gt 0 && echo "Cleared ${COUNT} files from ${BACKUPPATH}"