slitaz-tools rev 758
tazinst new: better error msg handling
author | Dominique Corbex <domcox@slitaz.org> |
---|---|
date | Tue May 01 12:47:28 2012 +0200 (2012-05-01) |
parents | b74a78ba53f7 |
children | 8e6a203e0881 |
files | installer/tazinst |
line diff
1.1 --- a/installer/tazinst Mon Apr 30 21:30:13 2012 +0200 1.2 +++ b/installer/tazinst Tue May 01 12:47:28 2012 +0200 1.3 @@ -20,7 +20,7 @@ 1.4 # 7: Another instance is running 1.5 # 8: Internal error 1.6 1.7 -VERSION=3.33 1.8 +VERSION=3.34 1.9 1.10 # Internationalization 1.11 . /usr/bin/gettext.sh 1.12 @@ -115,6 +115,7 @@ 1.13 gen_setup() 1.14 { 1.15 SETUP=$1 1.16 + [ -z "$1" ] && abort 1 "Missing <file> parameter for install configuration" 1.17 touch $SETUP || abort 2 $(gettext "Can't write setup file") 1.18 if [ -r "$SETUP" ]; then 1.19 cat > $SETUP << _EOF_ 1.20 @@ -172,7 +173,7 @@ 1.21 TGT_WINBOOT="" 1.22 1.23 _EOF_ 1.24 - 1.25 + echo "$(ls $1)" $(gettext "created.") 1.26 else 1.27 abort 2 $(gettext "Setup file not found") 1.28 fi 1.29 @@ -1220,6 +1221,7 @@ 1.30 new) 1.31 gen_setup $2 ;; 1.32 showurl) 1.33 + LOG="/dev/null" 1.34 case $2 in 1.35 stable) 1.36 echo $URL_STABLE ;; 1.37 @@ -1227,6 +1229,8 @@ 1.38 echo $URL_COOKING ;; 1.39 rolling) 1.40 echo $URL_ROLLING ;; 1.41 + *) 1.42 + abort 1 $(gettext "Unknown url shortcut") 1.43 esac ;; 1.44 check) 1.45 LOG="/dev/null"