mirror of
https://github.com/gnustep/tools-make.git
synced 2025-05-05 19:30:55 +00:00
Better set up of GNUSTEP_PATHPREFIX_LIST (and PATH and CLASSPATH as a
consequence) by removing duplicates git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@13348 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a7b6a2132f
commit
9066949870
1 changed files with 42 additions and 7 deletions
|
@ -114,7 +114,9 @@ fi
|
|||
export GNUSTEP_USER_ROOT
|
||||
|
||||
#
|
||||
# Add the GNUstep tools directories to the path
|
||||
# GNUSTEP_PATHPREFIX_LIST is like an abstract path-like shell
|
||||
# variable, which can be used to search the gnustep directories - and
|
||||
# in these scripts, it is also used to set up other shell variables
|
||||
#
|
||||
if [ -z "$GNUSTEP_PATHPREFIX_LIST" ]; then
|
||||
|
||||
|
@ -124,18 +126,51 @@ if [ -z "$GNUSTEP_PATHPREFIX_LIST" ]; then
|
|||
G_L_R=`$GNUSTEP_MAKEFILES/fixpath.sh -u "$GNUSTEP_LOCAL_ROOT"`
|
||||
G_N_R=`$GNUSTEP_MAKEFILES/fixpath.sh -u "$GNUSTEP_NETWORK_ROOT"`
|
||||
G_S_R=`$GNUSTEP_MAKEFILES/fixpath.sh -u "$GNUSTEP_SYSTEM_ROOT"`
|
||||
GNUSTEP_PATHPREFIX_LIST="$G_U_R:$G_L_R:$G_N_R:$G_S_R"
|
||||
unset G_U_R
|
||||
unset G_L_R
|
||||
unset G_N_R
|
||||
unset G_S_R
|
||||
else
|
||||
GNUSTEP_PATHPREFIX_LIST="$GNUSTEP_USER_ROOT:$GNUSTEP_LOCAL_ROOT:$GNUSTEP_NETWORK_ROOT:$GNUSTEP_SYSTEM_ROOT"
|
||||
G_U_R="$GNUSTEP_USER_ROOT"
|
||||
G_L_R="$GNUSTEP_LOCAL_ROOT"
|
||||
G_N_R="$GNUSTEP_NETWORK_ROOT"
|
||||
G_S_R="$GNUSTEP_SYSTEM_ROOT"
|
||||
fi
|
||||
|
||||
# Now we basically want to build
|
||||
# GNUSTEP_PATHPREFIX_LIST="$G_U_R:$G_L_R:$G_N_R:$G_S_R"
|
||||
# but we want to remove duplicates.
|
||||
|
||||
# Start with $G_U_R:$G_L_R - or $G_U_R if they are the same
|
||||
if [ "$G_L_R" != "$G_U_R" ]; then
|
||||
GNUSTEP_PATHPREFIX_LIST="$G_U_R:$G_L_R"
|
||||
else
|
||||
GNUSTEP_PATHPREFIX_LIST="$G_U_R"
|
||||
fi
|
||||
|
||||
# Now append $G_N_R but only if different from what already there
|
||||
if [ "$G_N_R" != "$G_U_R" ]; then
|
||||
if [ "$G_N_R" != "$G_L_R" ]; then
|
||||
GNUSTEP_PATHPREFIX_LIST="$GNUSTEP_PATHPREFIX_LIST:$G_N_R"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Now append $G_S_R but only if different from what already there
|
||||
if [ "$G_S_R" != "$G_U_R" ]; then
|
||||
if [ "$G_S_R" != "$G_L_R" ]; then
|
||||
if [ "$G_S_R" != "$G_N_R" ]; then
|
||||
GNUSTEP_PATHPREFIX_LIST="$GNUSTEP_PATHPREFIX_LIST:$G_S_R"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
unset G_U_R
|
||||
unset G_L_R
|
||||
unset G_N_R
|
||||
unset G_S_R
|
||||
|
||||
export GNUSTEP_PATHPREFIX_LIST
|
||||
fi
|
||||
|
||||
#
|
||||
# Add path to Tools to PATH
|
||||
#
|
||||
tmp_IFS="$IFS"
|
||||
IFS=:
|
||||
temp_path=
|
||||
|
|
Loading…
Reference in a new issue