Permalink
Fetching contributors…
Cannot retrieve contributors at this time
executable file 9 lines (8 sloc) 204 Bytes
#!/bin/bash
CURPATH=$(pwd)
if [ $(echo $CURPATH | grep -P "^$HOME/public_html/") ]; then
SITE=$(echo $CURPATH | perl -plne "s/^.*?public_html\///" | perl -plne "s/\/.*$//")
echo $SITE
exit 0
fi
exit 1