#!/bin/bash dbquery() { mysql -s -s -e "$*" trac } # main function main() { find /var/www/localhost/htdocs/backup/ -mindepth 1 -maxdepth 1 -ctime 7 | xargs rm -rf } # go to script dir pushd $(dirname $0) > /dev/null # get global functions source "./functions.sh" # load configuration source "./config.sh" # exit on errors set -e # start main program main "$@" # leave script dir popd > /dev/null