mirror of
https://github.com/gnustep/tools-make.git
synced 2025-04-22 22:00:49 +00:00
Fixed some technicalities - shell evaluations being incorrect
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@13339 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
6b1b33ed0c
commit
4147fd2e12
1 changed files with 8 additions and 6 deletions
|
@ -41,7 +41,7 @@ function reset_path
|
|||
|
||||
# NB: We need to use eval because we want to access a variable
|
||||
# whose name is another variable!
|
||||
original_path=`eval echo \$"$1"`
|
||||
original_path=$(eval echo \$$1)
|
||||
tmp_IFS="$IFS"
|
||||
IFS=:
|
||||
temp_path=
|
||||
|
@ -51,10 +51,12 @@ function reset_path
|
|||
# a path in GNUSTEP_PATHPREFIX_LIST as prefix
|
||||
found=no;
|
||||
for gnustep_dir in $GNUSTEP_PATHPREFIX_LIST; do
|
||||
case $dir in
|
||||
$gnustep_dir*) found=yes; break;;
|
||||
*);;
|
||||
esac;
|
||||
if [ -n "$gnustep_dir" ]; then
|
||||
case $dir in
|
||||
$gnustep_dir*) found=yes; break;;
|
||||
*);;
|
||||
esac;
|
||||
fi;
|
||||
done;
|
||||
if [ "$found" = "no" ]; then
|
||||
if [ -z "$temp_path" ]; then
|
||||
|
@ -67,7 +69,7 @@ function reset_path
|
|||
IFS=$tmp_IFS
|
||||
|
||||
# Not set the path variable.
|
||||
eval "$1=$temp_path"
|
||||
eval "$1=\$temp_path"
|
||||
# Export it only if non empty, otherwise remove it completely from
|
||||
# the shell environment.
|
||||
temp_path=`eval echo \$"$1"`
|
||||
|
|
Loading…
Reference in a new issue