Fixed a minor bug

master
Joel Leclerc 2012-05-01 16:27:33 -06:00
parent 5d6229a9c0
commit 9b5fc72d82
2 changed files with 6 additions and 5 deletions

View File

@ -45,19 +45,19 @@ do
h) usage;;
v) version;;
t) TARGET=`readlink -f $OPTARG`;NOTARGET=0;;
\?) echo "Invalid option: $OPTARG"; usage 1;;
:) echo "Option requires an argument: $OPTARG"; usage 1;;
\?) printe "Invalid option: $OPTARG"; usage 1;;
:) printe "Option requires an argument: $OPTARG"; usage 1;;
esac
done
if [ $NOTARGET -eq 1 ]
then
echo "FATAL: No target specified"
printe "FATAL: No target specified"
usage 1
fi
if [ -e $TARGET ]
then
echo "FATAL: Target already exists"
printe "FATAL: Target already exists"
exit 1
fi

View File

@ -74,6 +74,7 @@ prints()
else
printf $Start$2$Sep$3$Sep$4$End"$1"$Start$End
fi
echo
}
# Prints an error message
@ -85,7 +86,7 @@ prints()
# printe "Error displaying Hello World"
printe()
{
prints "$@" $Normal $Red &>2
prints "$@" $Bold $Red >&2
}
# Prints a message using grammar