mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: fix tools/lib-dir -help output
This commit is contained in:
@ -31,16 +31,18 @@ printHelp() {
|
|||||||
Usage: ${0##*/} [OPTION] DIR [LIBEXT]
|
Usage: ${0##*/} [OPTION] DIR [LIBEXT]
|
||||||
|
|
||||||
options:
|
options:
|
||||||
-sh Emit POSIX shell syntax (default)
|
-sh Emit POSIX shell syntax (default)
|
||||||
-csh Emit C-shell shell syntax
|
-csh Emit C-shell shell syntax
|
||||||
-make Emit content for a makefile
|
-sh-verbose As per -sh, with additional verbosity
|
||||||
-help Print the usage
|
-csh-verbose As per -csh, with additional verbosity
|
||||||
|
-make Emit content for a makefile
|
||||||
|
-help Print the usage
|
||||||
|
|
||||||
Resolves for the existence of DIR/lib64 and DIR/lib, or uses the fallback
|
Resolves for the existence of DIR/lib64 and DIR/lib, or uses the fallback
|
||||||
LIBEXT if these failed. A DIR ending in "-none" or "-system" is skipped.
|
LIBEXT if these failed. A DIR ending in "-none" or "-system" is skipped.
|
||||||
|
|
||||||
With -sh LD_LIBRARY_PATH=dir/lib:$LD_LIBRARY_PATH
|
With -sh LD_LIBRARY_PATH=dir/lib:\$LD_LIBRARY_PATH
|
||||||
With -csh setenv LD_LIBRARY_PATH dir/lib:$LD_LIBRARY_PATH
|
With -csh setenv LD_LIBRARY_PATH dir/lib:\$LD_LIBRARY_PATH
|
||||||
With -make -Ldir/lib
|
With -make -Ldir/lib
|
||||||
|
|
||||||
Exit status is zero (success) or non-zero (failure)
|
Exit status is zero (success) or non-zero (failure)
|
||||||
@ -65,6 +67,7 @@ die()
|
|||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
optSyntax=sh
|
optSyntax=sh
|
||||||
|
unset verboseOutput
|
||||||
|
|
||||||
# Parse options
|
# Parse options
|
||||||
while [ "$#" -gt 0 ]
|
while [ "$#" -gt 0 ]
|
||||||
@ -75,6 +78,11 @@ do
|
|||||||
;;
|
;;
|
||||||
-csh | -sh | -make)
|
-csh | -sh | -make)
|
||||||
optSyntax="${1#-}"
|
optSyntax="${1#-}"
|
||||||
|
unset verboseOutput
|
||||||
|
;;
|
||||||
|
-csh-verbose | -sh-verbose)
|
||||||
|
optSyntax="${1#-}"
|
||||||
|
verboseOutput="source " # Report: "export/setenv ..."
|
||||||
;;
|
;;
|
||||||
--)
|
--)
|
||||||
shift
|
shift
|
||||||
@ -148,15 +156,31 @@ then
|
|||||||
;;
|
;;
|
||||||
csh-Darwin*)
|
csh-Darwin*)
|
||||||
echo "setenv DYLD_LIBRARY_PATH $resolved:$DYLD_LIBRARY_PATH"
|
echo "setenv DYLD_LIBRARY_PATH $resolved:$DYLD_LIBRARY_PATH"
|
||||||
|
if [ -n "$verboseOutput" ]
|
||||||
|
then
|
||||||
|
echo "setenv DYLD_LIBRARY_PATH $resolved:$DYLD_LIBRARY_PATH" 1>&2
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
csh*)
|
csh*)
|
||||||
echo "setenv LD_LIBRARY_PATH $resolved:$LD_LIBRARY_PATH"
|
echo "setenv LD_LIBRARY_PATH $resolved:$LD_LIBRARY_PATH"
|
||||||
|
if [ -n "$verboseOutput" ]
|
||||||
|
then
|
||||||
|
echo "setenv LD_LIBRARY_PATH $resolved:$LD_LIBRARY_PATH" 1>&2
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
sh-Darwin*)
|
sh-Darwin*)
|
||||||
echo "DYLD_LIBRARY_PATH=$resolved:$DYLD_LIBRARY_PATH"
|
echo "DYLD_LIBRARY_PATH=$resolved:$DYLD_LIBRARY_PATH"
|
||||||
|
if [ -n "$verboseOutput" ]
|
||||||
|
then
|
||||||
|
echo "DYLD_LIBRARY_PATH=$resolved:$DYLD_LIBRARY_PATH" 1>&2
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "LD_LIBRARY_PATH=$resolved:$LD_LIBRARY_PATH"
|
echo "LD_LIBRARY_PATH=$resolved:$LD_LIBRARY_PATH"
|
||||||
|
if [ -n "$verboseOutput" ]
|
||||||
|
then
|
||||||
|
echo "LD_LIBRARY_PATH=$resolved:$LD_LIBRARY_PATH" 1>&2
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
exit 0 # Good
|
exit 0 # Good
|
||||||
|
|||||||
Reference in New Issue
Block a user