tools/sethost.sh: Fix several syntax errors

This commit is contained in:
Gregory Nutt 2016-08-09 13:20:20 -06:00
parent 8b5833f7fe
commit 01fd4952f9

View File

@ -111,10 +111,10 @@ unset dotconfig
if [ -z "$configfile" ]; then if [ -z "$configfile" ]; then
dotconfig=y dotconfig=y
else else
if [ "X$configfile" = "X.config"]; then if [ "X$configfile" = "X.config" ]; then
dotconfig=y dotconfig=y
else else
if [ "X$configfile" = "X$nuttx/.config"]; then if [ "X$configfile" = "X$nuttx/.config" ]; then
dotconfig=y dotconfig=y
fi fi
fi fi
@ -142,18 +142,18 @@ else
configdir=`dirname $configfile` configdir=`dirname $configfile`
makedefs=$configdir/Make.defs makedefs=$configdir/Make.defs
if [ ! -r $makedefs]; then if [ ! -r $makedefs ]; then
echo "ERROR: No readable Make.defs file exists at $configdir" echo "ERROR: No readable Make.defs file exists at $configdir"
exit 1 exit 1
fi fi
if [ -f $nuttx/.config]; then if [ -f $nuttx/.config ]; then
mv $nuttx/.config $nuttx/SAVEconfig mv $nuttx/.config $nuttx/SAVEconfig
fi fi
cp $configfile $nuttx/.config || \ cp $configfile $nuttx/.config || \
{ echo "ERROR: cp to $nuttx/.config failed"; exit 1; } { echo "ERROR: cp to $nuttx/.config failed"; exit 1; }
if [ -f $nuttx/Make.defs]; then if [ -f $nuttx/Make.defs ]; then
mv $nuttx/Make.defs $nuttx/SAVEMake.defs mv $nuttx/Make.defs $nuttx/SAVEMake.defs
fi fi
cp $makedefs $nuttx/Make.defs || \ cp $makedefs $nuttx/Make.defs || \
@ -230,4 +230,4 @@ if [ "X$dotconfig" != "Xy" ]; then
mv SAVEMake.defs Make.defs || \ mv SAVEMake.defs Make.defs || \
{ echo "ERROR: Failed to move SAVEMake.defs to Make.defs"; exit 1; } { echo "ERROR: Failed to move SAVEMake.defs to Make.defs"; exit 1; }
fi fi
fi fi