What is wrong with this? I can’t seem to assign anything to the $SITE var. The “rm”s don’t work either. Am I concatenation the command and var wrong?
newsite () {
local SITE = $1;
if [ -z "$1" ]; then # Is parameter #1 zero length?
echo 'Please give the site a name'
read = SITENAME;
$SITE = $SITENAME
fi
git clone git://mydomain/site_template.git $SITE
echo "New site has been created called: \"$SITE\"."
rm -rf $SITE"/.git";
rm $SITE"/README.txt";
return 0
}
take care of whitespaces:
also:
and