You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
633 B

#!/bin/bash
#This is a script to make document directories and copies template files over
function fail {
printf '%s\n' "$1" >&2
exit "${2-1}"
}
#Make the new project directory
if [ ! -d $1 ]; then
mkdir $1 || fail "Failed making project directory exiting script"
fi
#Set up the file structures
cd $1
if [ ! -d Figures ]; then
mkdir Figures
fi
case $2 in
"article")
cp ~/typsetting/article.tex ~/typesetting/GTLogo.pdf . ;;
"presentation")
cp ~/typsetting/presentation.tex ~/typesetting/GTLogo.pdf . ;;
"notes")
cp ~/typesetting/notes.md . ;;
*)
fail "$2 does not have a template"
esac