Crombie Tools
presentation.sh
Go to the documentation of this file.
1 #!/bin/bash
2 
3 date=$1
4 
5 projName=`git rev-parse --show-toplevel`
6 
7 docs=`find $projName -name docs | grep --invert-match '\/.git\/'`
8 
9 if [ ! -f $docs/presentation.tex ]
10 then
11  echo ""
12  echo "Must be called from within a directory that was set up by"
13  echo "crombie workspace and initialized as a git repository."
14  echo ""
15  exit 0
16 fi
17 
18 if [ "$date" = "" ]
19 then
20  date=$(date +%y%m%d)
21 fi
22 
23 if [ -d $docs/$date ]
24 then
25  echo "Presentation already exists with selected date: $date"
26  exit 0
27 fi
28 
29 target=$docs/$date
30 
31 mkdir $target
32 cp $docs/presentation.tex $target/$USER\_${projName##*/}\_$date.tex
33 mkdir $target/figs
34 cp $docs/download.sh $target/figs/.
35 
36 cd $target