-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #284 from gerlero/vars
Update variable naming
- Loading branch information
Showing
5 changed files
with
139 additions
and
139 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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
SCRIPT_DIR="$(\cd $(dirname ${BASH_SOURCE:-${ZSH_NAME:+$0}}) && \pwd -L)" | ||
script_dir="$(\cd $(dirname ${BASH_SOURCE:-${ZSH_NAME:+$0}}) && \pwd -L)" | ||
|
||
"$SCRIPT_DIR/../volume" -quiet mount | ||
"$script_dir/../volume" -quiet mount | ||
|
||
VOLUME=`"$SCRIPT_DIR/../volume" -show-prefix` | ||
volume=`"$script_dir/../volume" -show-prefix` | ||
|
||
if [ ${BASH_VERSINFO:-4} -ge 4 ]; then | ||
# Keep the volume directory open in this process (prevents accidental ejection) | ||
exec {fd}<"$VOLUME" | ||
exec {fd}<"$volume" | ||
fi | ||
|
||
. "$VOLUME/etc/bashrc" | ||
. "$volume/etc/bashrc" |
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 |
---|---|---|
@@ -1,28 +1,28 @@ | ||
#!/bin/zsh -e | ||
|
||
APP_NAME="{{APP_NAME}}" | ||
app_name="{{app_name}}" | ||
|
||
APP_BUNDLE="${0:A:h:h:h:h}" | ||
app_bundle="${0:A:h:h:h:h}" | ||
|
||
if [ $# -eq 0 ]; then | ||
echo "---------------------------------------------------------------------------" 1>&2 | ||
echo " | " 1>&2 | ||
echo " ( ) | °°° $APP_NAME.app °°° " 1>&2 | ||
echo " ( ) | °°° $app_name.app °°° " 1>&2 | ||
echo " ( ) ( ) | " 1>&2 | ||
echo " ( ) | Native OpenFOAM for macOS " 1>&2 | ||
echo " | {{APP_HOMEPAGE}} " 1>&2 | ||
echo "---------------------------------------------------------------------------" 1>&2 | ||
|
||
"$APP_BUNDLE/Contents/Resources/volume" mount 1>&2 | ||
"$app_bundle/Contents/Resources/volume" mount 1>&2 | ||
|
||
echo "Activating the OpenFOAM environment..." 1>&2 | ||
else | ||
"$APP_BUNDLE/Contents/Resources/volume" -quiet mount 1>&2 | ||
"$app_bundle/Contents/Resources/volume" -quiet mount 1>&2 | ||
fi | ||
|
||
VOLUME=$("$APP_BUNDLE/Contents/Resources/volume" -show-prefix) | ||
volume=$("$app_bundle/Contents/Resources/volume" -show-prefix) | ||
|
||
# Keep the volume directory open in this process (prevents accidental ejection) | ||
exec {fd}<"$VOLUME" | ||
exec {fd}<"$volume" | ||
|
||
PATH="$VOLUME/usr/opt/bash/bin${PATH+:$PATH}" exec bash "$VOLUME/etc/openfoam" "$@" | ||
PATH="$volume/usr/opt/bash/bin${PATH+:$PATH}" exec bash "$volume/etc/openfoam" "$@" |
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
Oops, something went wrong.