sitemap-generator 475 Bytes
Newer Older
Bostjan Skufca committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
#!/bin/bash



### Init shell
#
cd `dirname $0`



### Check if command exist
#
CMD="$1"
if [ "$CMD" != "" ]; then
    if ./console list sitemap | grep '^  sitemap:' | sed -e 's/^  sitemap://' | awk '{print $1}' | grep -c "$CMD" > /dev/null; then
        ./console sitemap:$@
    else
        ./console list sitemap
        echo
        echo "ERROR: Unknown sitemap:... command, see help above or use ./console instead"
        echo
    fi
else
    ./console list sitemap
fi