diff options
| -rwxr-xr-x | compile_debug.sh | 6 | ||||
| -rwxr-xr-x | compile_release.sh | 6 | ||||
| -rwxr-xr-x | install_debug.sh | 11 | ||||
| -rwxr-xr-x | install_release.sh | 8 | 
4 files changed, 18 insertions, 13 deletions
diff --git a/compile_debug.sh b/compile_debug.sh index 3ecab3c0..3ea31882 100755 --- a/compile_debug.sh +++ b/compile_debug.sh @@ -4,7 +4,7 @@ ME=compile_debug  if (($# == 1 ))  then -    PREFIX=`echo "$1"|sed -e "s,\/$,,"` +    PREFIX=${1/%\//}  else      PREFIX="/usr/local/ouroboros"  fi @@ -20,7 +20,7 @@ if test -n "$BUILDDIR" ; then          echo "$ME: Cannot create directory '$BUILDDIR'"      }  fi -cd $BUILDDIR +cd $BUILDDIR || exit 1  echo "$ME: Debug directory will be '$DEBUGDIR'"  if test -n "$DEBUGDIR" ; then @@ -28,7 +28,7 @@ if test -n "$DEBUGDIR" ; then          echo "$ME: Cannot create directory '$DEBUGDIR'"      }  fi -cd $DEBUGDIR +cd $DEBUGDIR || exit 1  cmake -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_BUILD_TYPE=Debug ../.. diff --git a/compile_release.sh b/compile_release.sh index e7e65ecc..a3b7dc2a 100755 --- a/compile_release.sh +++ b/compile_release.sh @@ -4,7 +4,7 @@ ME=compile_release  if (($# == 1 ))  then -    PREFIX=`echo "$1"|sed -e "s,\/$,,"` +    PREFIX=${1/%\//}  else      PREFIX=""  fi @@ -20,7 +20,7 @@ if test -n "$BUILDDIR" ; then          echo "$ME: Cannot create directory '$BUILDDIR'"      }  fi -cd $BUILDDIR +cd $BUILDDIR || exit 1  echo "$ME: Release directory will be '$RELEASEDIR'"  if test -n "$RELEASEDIR" ; then @@ -28,7 +28,7 @@ if test -n "$RELEASEDIR" ; then          echo "$ME: Cannot create directory '$RELEASEDIR'"      }  fi -cd $RELEASEDIR +cd $RELEASEDIR || exit 1  cmake -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_BUILD_TYPE=Release ../.. diff --git a/install_debug.sh b/install_debug.sh index 8f39be00..277ca92d 100755 --- a/install_debug.sh +++ b/install_debug.sh @@ -1,9 +1,16 @@  #!/usr/bin/env bash +if (($# == 1 )) +then +    PREFIX=${1/%\//} +else +    PREFIX="/usr/local/ouroboros" +fi +  BUILDDIR=build  DEBUGDIR=debug -bash compile_debug.sh $1 +bash compile_debug.sh "$PREFIX" -cd $BUILDDIR/$DEBUGDIR +cd $BUILDDIR/$DEBUGDIR || exit 1  make install diff --git a/install_release.sh b/install_release.sh index 5bd56a42..fa6fe675 100755 --- a/install_release.sh +++ b/install_release.sh @@ -1,10 +1,8 @@  #!/usr/bin/env bash -ME=install_release -  if (($# == 1 ))  then -    PREFIX=`echo "$1"|sed -e "s,\/$,,"` +    PREFIX=${1/%\//}  else      PREFIX=""  fi @@ -12,7 +10,7 @@ fi  BUILDDIR=build  RELEASEDIR=release -bash compile_release.sh $PREFIX +bash compile_release.sh "$PREFIX" -cd $BUILDDIR/$RELEASEDIR +cd $BUILDDIR/$RELEASEDIR || exit 1  make install  | 
