changeset 235:c0d9e91f528b

Improve error message when $1 not found.
author Rob Landley <rob@landley.net>
date Sun, 28 Oct 2007 03:19:59 -0500
parents e52f1c8dfd91
children 9c48cf5b65f6
files sources/toys/miniconfig.sh
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/sources/toys/miniconfig.sh	Fri Oct 19 06:01:50 2007 -0500
+++ b/sources/toys/miniconfig.sh	Sun Oct 28 03:19:59 2007 -0500
@@ -10,12 +10,18 @@
 
 export KCONFIG_NOTIMESTAMP=1
 
-if [ $# -ne 1 ] || [ ! -f "$1" ]
+if [ $# -ne 1 ]
 then
   echo "Usage: miniconfig.sh configfile" 
   exit 1
 fi
 
+if [ ! -f "$1" ]
+then
+  echo "Couldn't find "'"'"$1"'"'
+  exit 1
+fi
+
 if [ "$1" == ".config" ]
 then
   echo "It overwrites .config, rename it and try again."