#! /bin/csh -f
#
# NAME
#      mkdirs.csh - make a full project directory hierarchy
#
# SYNOPSIS
#      mkdirs.csh projectname
#
# DESCRIPTION:
#     Project librarians execute this script from their home directory to
#     create a new project directory structure.  The script will create both
#     alpha and work directories, each of which will be populated with a
#     project directory hierarchy under the given project name.
#
#     If some of the directory structure already exists, selected commands
#     can be executed maually as necessary.
# 
echo "making projects"

mkdir projects
cd projects

echo "making projects/alpha and projects/work"
mkdir alpha
mkdir work

cd alpha
echo "making projects/alpha/"$1
mkdir polysuite
cd polysuite
echo "making projects/alpha/polysuite/administration, etc."
mkdir administration
mkdir administration/minutes
mkdir administration/RCS
mkdir design
mkdir design/RCS
mkdir documentation
mkdir documentation/RCS
mkdir implementation
mkdir implementation/RCS
mkdir prototype
mkdir requirements
mkdir requirements/RCS
mkdir specification
mkdir specification/RCS
mkdir subprojects
mkdir testing
mkdir testing/RCS

echo "cd'ing to projects/work"
cd ../../work
echo "making projects/work/polysuite"
mkdir polysuite
cd polysuite
echo "making projects/alpha/polysuite/administration, etc."
mkdir administration
mkdir administration/minutes
mkdir administration/RCS
echo "copying ~gfisher/projects/alpha/polysuite/administration/meeting-minutes-template.html to ./administration/minutes"
cp ~gfisher/projects/alpha/polysuite/administration/meeting-minutes-template.html administration/minutes
echo "copying ~gfisher/projects/alpha/polysuite/administration/SCOs-template.html administration to ./administration"
cp ~gfisher/projects/alpha/polysuite/administration/SCOs-template.html administration
mkdir design
mkdir design/RCS
mkdir documentation
mkdir documentation/RCS
mkdir implementation
mkdir implementation/RCS
mkdir prototype
mkdir requirements
mkdir requirements/RCS
mkdir specification
mkdir specification/RCS
mkdir subprojects
mkdir testing
mkdir testing/RCS

echo "cd'ing to ~/www and linking to ../projects if not already there"
cd ~/www
if (! -e projects) then
    ln -s ../projects .
else
    echo www/projects link already exists
endif
