diff options
author | Peter Palfrader <peter@palfrader.org> | 2016-08-10 09:48:06 +0200 |
---|---|---|
committer | Peter Palfrader <peter@palfrader.org> | 2016-08-10 09:48:06 +0200 |
commit | 0c92e76fd21b010e9d5ab1b3634c3f7f5d648cf9 (patch) | |
tree | ebeead6ce5ca4193c27e7344336f0d179bad2747 /move-home-litter | |
parent | 3c27a0a32ed746947b658cf2d2449b32c4c2446c (diff) |
Check for whitelist
Diffstat (limited to 'move-home-litter')
-rwxr-xr-x | move-home-litter | 6 |
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' | |