forked from ossimlabs/ossim
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
oscarkramer
committed
Dec 9, 2015
1 parent
7393a75
commit 54f3cb4
Showing
2 changed files
with
49 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) | ||
pushd $SCRIPT_DIR/../../.. | ||
OSSIM_DEV_HOME=$PWD | ||
echo "STATUS: Setting OSSIM_DEV_HOME = <$OSSIM_DEV_HOME>" | ||
|
||
echo "STATUS: Checking presence of env var OSSIM_BUILD_DIR = <$OSSIM_BUILD_DIR>..."; | ||
if [ -z $OSSIM_BUILD_DIR ]; then | ||
OSSIM_BUILD_DIR=$OSSIM_DEV_HOME/build; | ||
if [ ! -d $OSSIM_BUILD_DIR ] ; then | ||
echo "ERROR: OSSIM_BUILD_DIR = <$OSSIM_BUILD_DIR> does not exist at this location. Cannot install"; | ||
exit 1; | ||
fi | ||
fi | ||
|
||
if [ -z $OSSIM_INSTALL_DIR ]; then | ||
OSSIM_INSTALL_DIR=$OSSIM_DEV_HOME/install; | ||
echo "INFO: OSSIM_INSTALL_DIR environment variable is not defined. Defaulting to <$OSSIM_INSTALL_DIR>"; | ||
fi | ||
|
||
if [ ! -d $OSSIM_INSTALL_DIR ] ; then | ||
echo "INFO: Installation directory <$OSSIM_INSTALL_DIR> does not exist. Creating..."; | ||
mkdir $OSSIM_INSTALL_PREFIX; | ||
fi | ||
|
||
pushd $OSSIM_BUILD_DIR | ||
echo "STATUS: Performing make install to <$OSSIM_INSTALL_DIR>" | ||
make install | ||
if [ $? -ne 0 ]; then | ||
echo; echo "ERROR: Error encountered during make install. Check the console log and correct." | ||
popd | ||
exit 1 | ||
fi | ||
echo; echo "STATUS: Install completed successfully. Install located in $OSSIM_INSTALL_DIR" | ||
popd # out of OSSIM_BUILD_DIR | ||
|
||
popd # out of OSSIM_DEV_HOME | ||
exit 0 | ||
|