~gpanders/pushbroom

ef96f9c64bf3e1a1543f67f2b7a7a017bfa8b737 — Greg Anders 4 years ago daca7db
Remove unused LOG_DIR variable
1 files changed, 1 insertions(+), 4 deletions(-)

M bin/janitor
M bin/janitor => bin/janitor +1 -4
@@ 9,9 9,6 @@ export DAYS_TO_KEEP=$2
# Trash folder to move deleted files to (default: ~/.Trash)
export TRASH_DIR=$3

# Location to store log files, relative to the Janitor directory (default: logs)
export LOG_DIR=logs

if [ -z "$TARGET_DIR" -o -z "$DAYS_TO_KEEP" ]; then
    echo "Minimum 2 arguments required"
    exit 1


@@ 27,7 24,7 @@ function clean() {
    fi
    rm -rf "$1"

    LOG="$LOG_DIR"/janitor_$(date +"%Y%m%d").log
    LOG="logs/janitor_$(date +"%Y%m%d").log"

    if [ ! -e $LOG ]; then
        echo "Files removed from $TARGET_DIR on $(date +%m-%d-%Y):" > "$LOG"