#!/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=1000

# Remove old files
find $cache -type f -mtime +$max_age -delete -print

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