# Create a new directory named after the first argument # mkdir $1 # Copy all files from the boiler plate directory # -v causes cp to be verbose (in case of an error) # -r includes all subdirectories and their contents # cd $1 cp -v -r ../boiler/* . # Fix the permissions # chown -R summahst . # change the owner on all the files to summahst chmod a+rx cgi-bin CartConfig # Everyone can read & execute these chmod u+w cgi-bin CartConfig # but only the owner can write to them cd cgi-bin chmod u+rwx *.cgi # Give the owner full permissions for the executables chmod go+rx *.cgi # Everyone else can read and execute them chmod a+rwx PDG_Cart # Give full permissions to everyone for this one cd PDG_Cart chmod a+rw * # Everyone can read and write chmod a-w catman sslconx # Except these, which no one can write... chmod a+x catman sslconx # ...but anyone can execute. chmod a-w pfpro chmod a+rx pfpro chmod u+w pfpro chmod a+x AdminTemplates EmailTemplates Intro ProdText # All Executable # Fix the paths in the *.conf files to point to $1 # sed s/theteaexchange/$1/ shopper.conf > temp cp temp shopper.conf sed s/theteaexchange/$1/ shipping.conf > temp cp temp shipping.conf rm temp # Just to make sure it did what you want... # echo New directory created: $1