BUG: foamConfigurePaths : incorrect logic

This commit is contained in:
mattijs
2010-11-04 12:50:09 +00:00
parent bbf218d668
commit a45f394c37

View File

@ -53,7 +53,8 @@ _inlineSed()
backup=`tempfile` backup=`tempfile`
cp $1 $backup cp $1 $backup
sed -i -e "$2" $1 sed -i -e "$2" $1
cmp $1 $backup || usage "Failed : $3" cmp --quiet $1 $backup && usage "Failed : $3"
return 0
} }
@ -71,8 +72,6 @@ do
--foamInstall) --foamInstall)
[ "$#" -ge 2 ] || usage "'$1' option requires an argument" [ "$#" -ge 2 ] || usage "'$1' option requires an argument"
foamInstall="$2" foamInstall="$2"
echo "** foamInstall:$foamInstall"
_inlineSed \ _inlineSed \
etc/bashrc \ etc/bashrc \
'/^[^#]/s@foamInstall=.*@foamInstall='"$foamInstall@" \ '/^[^#]/s@foamInstall=.*@foamInstall='"$foamInstall@" \