#!/bin/sh

# Remove old files from the approx(8) cache

# Location of the cache
cache=/var/cache/approx

# Maximum age of files to keep, in days
max_age=365

# Extra args for the find command, eg. '-print'
extra_args=

# Remove old files
find -H $cache -type f -ctime +$max_age -delete $extra_args

# Remove empty files and directories
find -H $cache -empty -delete $extra_args
