aboutsummaryrefslogtreecommitdiff
path: root/trunk/lib
diff options
context:
space:
mode:
authorrudson <rudson@04377dda-e619-0410-9926-eae83683ac58>2007-12-01 01:16:52 +0000
committerrudson <rudson@04377dda-e619-0410-9926-eae83683ac58>2007-12-01 01:16:52 +0000
commit76cb2a284631a2354a368320234b16f4316fd137 (patch)
tree5b945dc8435be4407f3d7abec746510ac5586b05 /trunk/lib
parent246475541fd2d6cb4a5e96010191f2ebaf841a23 (diff)
downloadsimplepkg-76cb2a284631a2354a368320234b16f4316fd137.tar.gz
simplepkg-76cb2a284631a2354a368320234b16f4316fd137.tar.bz2
Várias alterações. Ver trunk/doc/CHANGELOG
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@461 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'trunk/lib')
-rw-r--r--trunk/lib/common.sh13
1 files changed, 13 insertions, 0 deletions
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
*)