Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
cd ../scripts
./GetFigures.sh -s -u
./GetFigures.sh
2 changes: 1 addition & 1 deletion Manuals/SMV_User_Guide/SMV_User_Guide.tex
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ \subsection{Automating the Visualization}
\subsubsection{Virtual Tour}\ A series of checkpoints or keyframes
specifying position and view direction may be specified. (Chapter
\ref{chapter:touring}) A smooth path is computed using
Kochanek-Bartels splines~\cite{Moller:02}\ to go through these key
Kochanek-Bartels splines~\cite{moller:02}\ to go through these key
frames so that one may control the position and view direction of
an observer as they move through the simulation. One can then see
the simulation as the observer would. This option is available
Expand Down
28 changes: 0 additions & 28 deletions Manuals/SMV_User_Guide/copy_SMV_figures_local.sh

This file was deleted.

7 changes: 4 additions & 3 deletions Manuals/SMV_User_Guide/make_guide.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ gitrevision=`git describe --abbrev=7 --long --dirty`
echo "\\newcommand{\\gitrevision}{$gitrevision}" > ../Bibliography/gitrevision.tex

pdflatex -interaction nonstopmode SMV_User_Guide &> SMV_User_Guide.err
biber SMV_User_Guide &> SMV_User_Guide.err
biber SMV_User_Guide &> SMV_User_Guide_biber.err
pdflatex -interaction nonstopmode SMV_User_Guide &> SMV_User_Guide.err
pdflatex -interaction nonstopmode SMV_User_Guide &> SMV_User_Guide.err
cat SMV_User_Guide_biber.err >> SMV_User_Guide.err

# Scan and report any errors in the LaTeX build process
if [[ `grep -E "Undefined control sequence|Error:|Fatal error|! LaTeX Error:|Paragraph ended before|Missing \\\$ inserted|Misplaced" -I SMV_User_Guide.err | grep -v "xpdf supports version 1.5"` == "" ]]
Expand All @@ -27,13 +28,13 @@ if [[ `grep -E "Undefined control sequence|Error:|Fatal error|! LaTeX Error:|Par
fi

# Check for LaTeX warnings (undefined references or duplicate labels)
if [[ `grep -E "undefined|multiply defined|multiply-defined" -I SMV_User_Guide.err` == "" ]]
if [[ `grep -E "undefined|WARN|multiply defined|multiply-defined" -I SMV_User_Guide.err` == "" ]]
then
# Continue along
:
else
echo "LaTeX warnings detected:"
grep -E "undefined|multiply defined|multiply-defined" -I SMV_User_Guide.err
grep -E "undefined|WARN|multiply defined|multiply-defined" -I SMV_User_Guide.err
clean_build=0
fi

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
cd ../scripts
./GetFigures.sh -s -v
./GetFigures.sh
7 changes: 4 additions & 3 deletions Manuals/SMV_Verification_Guide/make_guide.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ gitrevision=`git describe --abbrev=7 --long --dirty`
echo "\\newcommand{\\gitrevision}{$gitrevision}" > ../Bibliography/gitrevision.tex

pdflatex -interaction nonstopmode SMV_Verification_Guide &> SMV_Verification_Guide.err
biber SMV_Verification_Guide &> SMV_Verification_Guide.err
biber SMV_Verification_Guide &> SMV_Verification_Guide_biber.err
pdflatex -interaction nonstopmode SMV_Verification_Guide &> SMV_Verification_Guide.err
pdflatex -interaction nonstopmode SMV_Verification_Guide &> SMV_Verification_Guide.err
cat SMV_Verification_Guide_biber.err >> SMV_Verification_Guide.err

# Scan and report any errors in the LaTeX build process
if [[ `grep -E "Undefined control sequence|Error:|Fatal error|! LaTeX Error:|Paragraph ended before|Missing \\\$ inserted|Misplaced" -I SMV_Verification_Guide.err | grep -v "xpdf supports version 1.5"` == "" ]]
Expand All @@ -27,13 +28,13 @@ if [[ `grep -E "Undefined control sequence|Error:|Fatal error|! LaTeX Error:|Par
fi

# Check for LaTeX warnings (undefined references or duplicate labels)
if [[ `grep -E "undefined|multiply defined|multiply-defined" -I SMV_Verification_Guide.err` == "" ]]
if [[ `grep -E "undefined|WARNING|multiply defined|multiply-defined" -I SMV_Verification_Guide.err` == "" ]]
then
# Continue along
:
else
echo "LaTeX warnings detected:"
grep -E "undefined|multiply defined|multiply-defined" -I SMV_Verification_Guide.err
grep -E "undefined|WARNING|multiply defined|multiply-defined" -I SMV_Verification_Guide.err
clean_build=0
fi

Expand Down
44 changes: 0 additions & 44 deletions Manuals/scripts/Copy_Smokebot_FiguresGH.sh

This file was deleted.

224 changes: 36 additions & 188 deletions Manuals/scripts/GetFigures.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,196 +1,44 @@
#!/bin/bash
GH_OWNER=firemodels
GH_REPO=test_bundles

#---------------------------------------------
# usage
#---------------------------------------------

function usage {
echo "Usage:"
echo "GetFigures.sh options"
echo ""
echo "Download FDS and/or Smokeview manual figures from github and copy to their"
echo "respecitve manual SCRIPT_DIRS directories"
echo ""
echo "./GetFigures.sh -a download all FDS and smokeview figures"
echo "./GetFigures.sh -F download all FDS figures"
echo "./GetFigures.sh -S download all Smokeview figures"
echo ""
echo "Options:"
echo "-a - copy all FDS and Smokeview manual figures"
echo "-f - copy FDS figures for manuals specified by -u, -v, -V and or -t options"
echo "-F - copy FDS figures for all guides"
echo "-h - display this message"
echo "-f - copy Smokeview figures for manuals specified by -u and/or -v options"
echo "-S - copy Smokeview figures for both user and verification guides"
echo "-t - copy FDS technical guide figures"
echo "-u - copy user guide figures (also specify either -f or -s)"
echo "-v - copy verification guide figures (also specify either -f or -s)"
echo "-V - copy FDS validation guide figures"
exit 0
}

#*** parse command line options

FDS=
SMV=
USE=
VER=
VAL=
TECH=
while getopts 'afFhsStuvV' OPTION
do
case $OPTION in
a)
FDS=1
SMV=1
USE=1
VER=1
VAL=1
TECH=1
;;
f)
FDS=1
;;
F)
FDS=1
USE=1
VER=1
VAL=1
TECH=1
;;
h)
usage;
;;
s)
SMV=1
;;
S)
SMV=1
USE=1
VER=1
;;
t)
FDS=1
TECH=1
;;
u)
USE=1
;;
v)
VER=1
;;
V)
FDS=1
VAL=1
;;
\?)
echo "***error: unknown option entered. aborting firebot"
exit 1
;;
esac
done
shift $(($OPTIND-1))

if [[ "$FDS" == "" ]] && [[ "$SMV" == "" ]]; then
FDS=1
fi

if [ "SMV" != "" ]; then
if [[ "$USE" == "" ]] && [[ "$VER" == "" ]]; then
USE=1
fi
fi

if [ "FDS" != "" ]; then
if [[ "$USE" == "" ]] && [[ "$VER" == "" ]] && [[ "$VAL" == "" ]] && [[ "$TECH" == "" ]]; then
USE=1
fi
fi

CURDIR=`pwd`

cd files
FILESDIR=`pwd`

git clean -dxf >& /dev/null

cd $CURDIR

DOWNLOADFILE ()
DOWNLOADFIGURES ()
{
TAG=$1
FILE=$2
echo ""
echo downloading $FILE using:
echo gh release download $TAG -p $FILE -D $FILESDIR -R github.com/$GH_OWNER/$GH_REPO
gh release download $TAG -p $FILE -D $FILESDIR -R github.com/$GH_OWNER/$GH_REPO
}

COPYFILES ()
{
TODIR=$1
FILE=$2
if [ -d $TODIR ]; then
echo "untarring $FILE to $TODIR"
cd $TODIR
if [ -e $FILESDIR/$FILE ]; then
tar xf $FILESDIR/$FILE > /dev/null 2>&1
else
echo "***error: $FILESDIR/$FILE does not exist"
fi
FILE=$1_figures
echo ***Downloading $FILE.tar.gz
gh release download SMOKEVIEW_TEST -p $FILE.tar.gz -R github.com/firemodels/test_bundles --clobber
if [ ! -e $FILE.tar.gz ]; then
echo ***error: $FILE.tar.gz failed to download
echo command: gh release download FDS_TEST -p $FILE.tar.gz -R github.com/firemodels/test_bundles --clobber
else
echo ***error: $TODIR does not exist
echo " successful"
fi
}

ROOT=../../..
cd $ROOT
ROOT=`pwd`

SMVREPO=$ROOT/smv
cd $SMVREPO
SMVREPO=`pwd`
cd $CURDIR

if [ "$SMV" != "" ]; then
if [ "$USE" != "" ]; then
DOWNLOADFILE SMOKEVIEW_TEST SMV_UG_figures.tar.gz
COPYFILES $SMVREPO//Manuals/SMV_User_Guide/SCRIPT_FIGURES SMV_UG_figures.tar.gz
fi

if [ "$VER" != "" ]; then
DOWNLOADFILE SMOKEVIEW_TEST SMV_VG_figures.tar.gz
COPYFILES $SMVREPO/Manuals/SMV_Verification_Guide/SCRIPT_FIGURES SMV_VG_figures.tar.gz
fi
DOWNLOADFIGURES SMV_UG
DOWNLOADFIGURES SMV_VG

SCRIPTDIR=`pwd`
cd ..
MANDIR=`pwd`

cd $SCRIPTDIR
rm -rf FIGS
mkdir FIGS
mkdir FIGS/SMV_UG
mkdir FIGS/SMV_VG

SBUG=$SCRIPTDIR/FIGS/SMV_UG
SBVG=$SCRIPTDIR/FIGS/SMV_VG

# Copy User's Guide Figures
if [ -e $SCRIPTDIR/SMV_UG_figures.tar.gz ]; then
cd $SBUG
tar xf $SCRIPTDIR/SMV_UG_figures.tar.gz
cp * $MANDIR/SMV_User_Guide/SCRIPT_FIGURES/
echo Smokeview Users Guide figures copied to SMV_User_Guide/SCRIPT_FIGURES
fi

FDSREPO=$ROOT/fds
cd $FDSREPO
FDSREPO=`pwd`
cd $CURDIR

if [ "$FDS" != "" ]; then
if [ "$USE" != "" ]; then
DOWNLOADFILE FDS_TEST FDS_UG_figures.tar.gz
COPYFILES $FDSREPO/Manuals/FDS_User_Guide/SCRIPT_FIGURES FDS_UG_figures.tar.gz
fi

if [ "$TECH" != "" ]; then
DOWNLOADFILE FDS_TEST FDS_TG_figures.tar.gz
COPYFILES $FDSREPO/Manuals/FDS_Technical_Reference_Guide/SCRIPT_FIGURES FDS_TG_figures.tar.gz
fi

if [ "$VER" != "" ]; then
DOWNLOADFILE FDS_TEST FDS_VERG_figures.tar.gz
COPYFILES $FDSREPO/Manuals/FDS_Verification_Guide/SCRIPT_FIGURES FDS_VERG_figures.tar.gz
fi

if [ "$VAL" != "" ]; then
DOWNLOADFILE FDS_TEST FDS_VALG_figures.tar.gz
COPYFILES $FDSREPO/Manuals/FDS_Validation_Guide/SCRIPT_FIGURES FDS_VALG_figures.tar.gz
fi
# Copy Verification Guide Figures
if [ -e $SCRIPTDIR/SMV_VG_figures.tar.gz ]; then
cd $SBVG
tar xf $SCRIPTDIR/SMV_VG_figures.tar.gz
cp * $MANDIR/SMV_Verification_Guide/SCRIPT_FIGURES/.
echo SMV Verification Guide figures copied to SMV_Verification_Guide_Guide/SCRIPT_FIGURES
fi
cd $CURDIR
exit 0
Loading