channel-scripts/remove-dead-files.sh
2012-11-09 12:40:10 +00:00

5 lines
322 B
Bash

#! /bin/sh
./print-dead-files.pl /data/releases/patches/all-patches $(find /data/releases -name MANIFEST | grep -v '\.trash' | grep -v '\.tmp') | sort > /tmp/dead
mkdir -p /data/releases/.trash/
xargs -d '\n' sh -c 'find "$@" -mtime +50 -print' < /tmp/dead | xargs -d '\n' mv -v --target-directory=/data/releases/.trash/