diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2008-05-24 19:53:59 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2008-05-24 19:53:59 +0200 |
commit | 193536b77797c5d2884e781adb93c92d8af5a39c (patch) | |
tree | 0b8749015bf16fc856db29ec6142f67ca8de6a86 | |
parent | 46e6cfeda1cef8594815a4b2dbe23c7eb3ebdd84 (diff) |
bin/pkg: split error into warn() and die()
-rwxr-xr-x | bin/pkg | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -16,13 +16,17 @@ info () { echo "${info}$*${reset}" } -error () { +warn () { + echo "${error}$*${reset}" +} + +die () { echo "${error}$*${reset}" exit 100 } if [ ! -d $PDIR ]; then - error "$PDIR not found!!" + die "$PDIR not found!!" fi check_deps () { @@ -31,7 +35,8 @@ check_deps () { INSTALL=() for dep in $DEPS; { if [ "$dep" = "$1" ]; then - error "This package depends on itself. Therefore, I'm considering it borked. Not installing." + warn "This package depends on itself. Therefore, I'm considering it borked. Not installing." + return 100 fi if [ ! -d $PDIR/$dep ]; then echo -n "$1 depends on $dep. Install dependency? [Y/n] " |