From 76cb2a284631a2354a368320234b16f4316fd137 Mon Sep 17 00:00:00 2001 From: rudson Date: Sat, 1 Dec 2007 01:16:52 +0000 Subject: Várias alterações. Ver trunk/doc/CHANGELOG MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@461 04377dda-e619-0410-9926-eae83683ac58 --- trunk/lib/common.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'trunk/lib/common.sh') diff --git a/trunk/lib/common.sh b/trunk/lib/common.sh index ef5d62a..3db98a8 100644 --- a/trunk/lib/common.sh +++ b/trunk/lib/common.sh @@ -711,6 +711,9 @@ function error_codes { # Commum error codes ERROR_FILE_NOTFOUND=100 # file not found + ERROR_NOT_NUMBER=101 # argument is not a number + ERROR_PAR_NUMBER=102 # incorrect number of parameters + ERROR_COMMON_NOT_FOUND=103 # common.sh not found # Createpkg error codes ERROR_CREATEPKG_INSTALLPKG=200 # installpkg error @@ -771,10 +774,18 @@ function handle_error { eecho $error "$BASENAME: error downloading $2 source from version control system" ;; $ERROR_MKDIR) eecho $error "$BASENAME: make directory $2 error, aborting" ;; + # # General errors $ERROR_FILE_NOTFOUND) eecho $error "$BASENAME: file $2 not found!" ;; + $ERROR_NOT_NUMBER) + eecho $error "$BASENAME: $2 need a number argument" ;; + $ERROR_PAR_NUMBER) + eecho $error "$BASENAME: incorrect number of parameters" ;; + $ERROR_COMMON_NOT_FOUND) + eecho $error "$BASENAME: file $COMMON_SH not found. Check your $BASENAME installation" + # # Createpkg errors $ERROR_CREATEPKG_INSTALLPKG) @@ -783,6 +794,7 @@ function handle_error { eecho $error "$BASENAME: dependency solve error, aborting" ;; $ERROR_CREATEPKG_SLACKBUILD_NOTFOUND) eecho $error "$BASENAME: SlackBuild or package not found" ;; + # # Mkbuild errors $ERROR_MKBUILD_CONSTRUCTION) @@ -791,6 +803,7 @@ function handle_error { eecho $error "$BASENAME: Program logical error." ;; $ERROR_MKBUILD_INPUT_PAR) eecho $error "$BASENAME: Input parameter $2 error. See \"mkbuild --help\"." ;; + # # Others errors *) -- cgit v1.2.3