37 lines
664 B
Text
37 lines
664 B
Text
|
#! /bin/bash
|
||
|
|
||
|
while [[ $# -gt 0 ]]
|
||
|
do
|
||
|
key="$1"
|
||
|
|
||
|
case $key in
|
||
|
-p|--project)
|
||
|
project="$2"
|
||
|
shift # past argument
|
||
|
shift # past value
|
||
|
;;
|
||
|
|
||
|
-h|--help)
|
||
|
echo "usage: clear-cache-files -p <project> [OPTIONS]"
|
||
|
echo "Cleares cache files created by osm2city."
|
||
|
echo ""
|
||
|
echo "OPTIONS"
|
||
|
echo " -p, --project Mandatory, project name which you want to clear of chache files"
|
||
|
echo " -h, --help Shows this help and exit"
|
||
|
exit 0
|
||
|
;;
|
||
|
|
||
|
*)
|
||
|
echo "Unknown option $key"
|
||
|
exit 1
|
||
|
;;
|
||
|
esac
|
||
|
done
|
||
|
|
||
|
if [ -z "$project" ]; then
|
||
|
echo "Option -p <project> is mandatory"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
rm projects/$project/*.pkl
|