server/clear_cache.sh

20 lines
320 B
Bash
Raw Normal View History

2013-12-14 05:11:14 +00:00
#!/bin/sh
# This script deletes Onyx framework cache
2013-12-14 05:11:14 +00:00
cd `dirname "$0"`
source config.sh
2013-12-14 05:11:14 +00:00
for n in "$@"
do
MD5=`echo -n $n | md5sum | cut -d " " -f 1`
if [ -f "onyx/cache/$MD5.cache.php" ]
then
rm -f "onyx/cache/$MD5.cache.php"
echo "--- $n deleted"
else
echo "/!\\ $n not found ($MD5)"
fi
done