mirror of
https://github.com/gnustep/tools-make.git
synced 2025-05-07 12:11:03 +00:00
Tidied up setting PATH and CLASSPATH to avoid spurious : at the end of vars
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@13354 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
26220966ab
commit
373ed0016e
1 changed files with 23 additions and 6 deletions
|
@ -175,11 +175,23 @@ tmp_IFS="$IFS"
|
||||||
IFS=:
|
IFS=:
|
||||||
temp_path=
|
temp_path=
|
||||||
for dir in $GNUSTEP_PATHPREFIX_LIST; do
|
for dir in $GNUSTEP_PATHPREFIX_LIST; do
|
||||||
temp_path="$temp_path$dir/Tools:"
|
|
||||||
|
# Prepare the path_fragment
|
||||||
if [ -z "$GNUSTEP_FLATTENED" ]; then
|
if [ -z "$GNUSTEP_FLATTENED" ]; then
|
||||||
temp_path="$temp_path$dir/Tools/${GNUSTEP_HOST_CPU}/${GNUSTEP_HOST_OS}/${LIBRARY_COMBO}:"
|
path_fragment="$dir/Tools:$dir/Tools/${GNUSTEP_HOST_CPU}/${GNUSTEP_HOST_OS}/${LIBRARY_COMBO}:$dir/Tools/${GNUSTEP_HOST_CPU}/${GNUSTEP_HOST_OS}"
|
||||||
temp_path="$temp_path$dir/Tools/${GNUSTEP_HOST_CPU}/${GNUSTEP_HOST_OS}:"
|
else
|
||||||
|
path_fragment="$dir/Tools"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Add it to temp_path
|
||||||
|
if [ -z "$temp_path" ]; then
|
||||||
|
temp_path="$path_fragment"
|
||||||
|
else
|
||||||
|
temp_path="$temp_path:$path_fragment"
|
||||||
|
fi
|
||||||
|
|
||||||
|
unset path_fragment
|
||||||
|
|
||||||
done
|
done
|
||||||
IFS="$tmp_IFS"
|
IFS="$tmp_IFS"
|
||||||
unset tmp_IFS
|
unset tmp_IFS
|
||||||
|
@ -188,7 +200,7 @@ if [ -z "$PATH" ]; then
|
||||||
PATH="$temp_path"
|
PATH="$temp_path"
|
||||||
else
|
else
|
||||||
if ( echo ${PATH}| grep -v "${temp_path}" >/dev/null ); then
|
if ( echo ${PATH}| grep -v "${temp_path}" >/dev/null ); then
|
||||||
PATH="${temp_path}${PATH}"
|
PATH="${temp_path}:${PATH}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
unset temp_path
|
unset temp_path
|
||||||
|
@ -200,8 +212,13 @@ tmp_IFS="$IFS"
|
||||||
IFS=:
|
IFS=:
|
||||||
gnustep_class_path=
|
gnustep_class_path=
|
||||||
for dir in $GNUSTEP_PATHPREFIX_LIST; do
|
for dir in $GNUSTEP_PATHPREFIX_LIST; do
|
||||||
# FIXME - ugly to add the ':' at the end of the CLASSPATH
|
|
||||||
gnustep_class_path="$gnustep_class_path$dir/Libraries/Java:"
|
if [ -z "$gnustep_class_path" ]; then
|
||||||
|
gnustep_class_path="$dir/Libraries/Java"
|
||||||
|
else
|
||||||
|
gnustep_class_path="$gnustep_class_path:$dir/Libraries/Java"
|
||||||
|
fi
|
||||||
|
|
||||||
done
|
done
|
||||||
IFS="$tmp_IFS"
|
IFS="$tmp_IFS"
|
||||||
unset tmp_IFS
|
unset tmp_IFS
|
||||||
|
|
Loading…
Reference in a new issue