easy-osm2city/clear-cache-files
merspieler 5332a8bbbe Initial commit
Signed-off-by: merspieler <merspieler@airmail.cc>
2018-11-18 15:00:00 +01:00

36 lines
664 B
Bash
Executable file

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