Skip to content

Commit

Permalink
Merge pull request #6434 from gforney/master
Browse files Browse the repository at this point in the history
update bundle scripts
  • Loading branch information
gforney committed May 21, 2018
2 parents b1776cb + 4355097 commit 41de37d
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 19 deletions.
11 changes: 11 additions & 0 deletions Build/Bundle/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Bundle FDS

The scripts make_bundle.sh and make_bundle.bat are used for creating FDS/Smokeview installation bundles. make_bundle.sh is used for Linux and OSX platforms and make_bundle.bat is used for Windows.
Environment variables required by make_bundle.sh are defined in ~/.bundle/FDS_SMV_ENV.sh.

To use this script, type ./make_bundle.sh in a bash shell (in this directory). To see usage information type ./make_bundle.sh -h .
Likewise to use make_bundle.bat, type make_bundle.bat in a windows command shell (again in this directory).

These scripts build all the software (by calling other scripts), collect manuals, example files and libraries that are needed then builds the bundle script. The created bundles are placed in the directory Utilities/uploads.

Note, this is as work in progress, these scripts are not yet complete.
102 changes: 84 additions & 18 deletions Build/Bundle/make_bundle.sh
Original file line number Diff line number Diff line change
@@ -1,32 +1,98 @@
#!/bin/bash

CURDIR=`pwd`
platform="linux"
if [ "`uname`" == "Darwin" ]; then
platform="osx"
fi

if [ -e scripts/GET_ENV.sh ]; then
CURDIR=`pwd`
cd $platform
source ../scripts/GET_ENV.sh
cd $CURDIR
fi

if [ "$fds_version" == "" ]; then
fds_version=FDS6.x.y
fi
if [ "$smv_version" == "" ]; then
smv_version=SMV6.x.y
fi
if [ "$FDSEDITION" == "" ]; then
FDSEDITION=FDS6
fi

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

function usage {
echo "Usage:"
echo "make_installer.sh [options]"
echo ""
echo "Create an installer named ${fds_version}-${smv_version}_${platform}64.sh"
echo "Options:"
echo "-b - only make the bundle script. Assume that all prerequisites have been"
echo " generated (fds, smokeview, manuals etc)"
if [ "$platform" == "linux" ]; then
echo "-d directory - directory where installation is placed [default: \$HOME/FDS/$FDSEDITION]"
else
echo "-d directory - directory where installation is placed [default: /Applications/FDS/$FDSEDITION]"
fi
echo "-f - fds version [default: $fds_version]"
echo "-h - show this message"
echo "-s - smokeview version [default: $smv_version]"
exit
}

MAKE_BUNDLE_PARTS=1
while getopts 'bd:f:hs:' OPTION
do
case $OPTION in
b)
MAKE_BUNDLE_PARTS=
;;
d)
FDSEDITION=$OPTION
;;
f)
fds_version=$OPTION
;;
h)
usage;
;;
s)
smv_version=$OPTION
;;
esac
done
shift $(($OPTIND-1))

CURDIR=`pwd`
cd $platform

echo making bundle for $platform

if [ "$MAKE_BUNDLE_PARTS" == "1" ]; then
echo -------------------------------------------------
echo -------------building fds------------------------
echo -------------------------------------------------
./make_fds.sh
echo -------------------------------------------------
echo --- building smokeview and associated programs --
echo -------------------------------------------------
./make_smv.sh
echo -------------------------------------------------
echo -------getting fds pubs -------------------------
echo -------------------------------------------------
./get_fds_pubs.sh
echo -------------------------------------------------
echo -------getting smokeview pubs -------------------
echo -------------------------------------------------
./get_smv_pubs.sh
fi
echo -------------------------------------------------
echo -------------building fds------------------------
echo -------------------------------------------------
./make_fds.sh
echo -------------------------------------------------
echo --- building smokeview and associated programs --
echo -------------------------------------------------
./make_smv.sh
echo -------------------------------------------------
echo -------getting fds pubs -------------------------
echo -------------------------------------------------
./get_fds_pubs.sh
echo -------------------------------------------------
echo -------getting smokeview pubs -------------------
echo -------------------------------------------------
./get_smv_pubs.sh
echo -------------------------------------------------
echo ------- making the bundle -----------------------
echo ------- making the bundle script -----------------------
echo -------------------------------------------------
./make_bundle.sh
echo -------------------------------------------------
Expand Down
4 changes: 3 additions & 1 deletion Build/Bundle/scripts/bundle_generic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,7 @@ echo Compressing archive
gzip ../$bundlebase.tar
echo Creating installer
cd ..
bundlepath=`pwd`/$bundlebase.sh
$makeinstaller -i $bundlebase.tar.gz -d $INSTALLDIR $bundlebase.sh

mkdir -p $BUNDLE_DIR
Expand All @@ -452,4 +453,5 @@ if [ -e $errlog ]; then
fi
rm $errlog
fi

echo installer located at:
echo $bundlepath

0 comments on commit 41de37d

Please sign in to comment.