summaryrefslogtreecommitdiff
path: root/move-home-litter
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2016-08-10 09:48:06 +0200
committerPeter Palfrader <peter@palfrader.org>2016-08-10 09:48:06 +0200
commit0c92e76fd21b010e9d5ab1b3634c3f7f5d648cf9 (patch)
treeebeead6ce5ca4193c27e7344336f0d179bad2747 /move-home-litter
parent3c27a0a32ed746947b658cf2d2449b32c4c2446c (diff)
Check for whitelist
Diffstat (limited to 'move-home-litter')
-rwxr-xr-xmove-home-litter6
1 files changed, 6 insertions, 0 deletions
diff --git a/move-home-litter b/move-home-litter
index 5f3eba6..ad16c38 100755
--- a/move-home-litter
+++ b/move-home-litter
@@ -33,6 +33,12 @@ YESTERDAY="$(date -d '1 day ago' '+%F')"
TGT="$TGTDIR/$YESTERDAY"
cd "$BASE"
+
+if ! [ -e "$WHITELIST" ] ; then
+ echo >&2 "You need to set up a whitelist of files to keep in $WHITELIST."
+ exit 1
+fi
+
mkdir -p "$TGT"
find -mindepth 1 -maxdepth 1 ! -name '.*' -printf '%f\0' |