diff options
Diffstat (limited to 'trunk/src/createpkg')
-rw-r--r-- | trunk/src/createpkg | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/trunk/src/createpkg b/trunk/src/createpkg index 93c658d..ce85a9c 100644 --- a/trunk/src/createpkg +++ b/trunk/src/createpkg @@ -27,7 +27,7 @@ # Createpkg functions #--------------------------------------------------- -CREATEPKG_VERSION="1.1.12" +CREATEPKG_VERSION="1.1.13" function usage { @@ -161,8 +161,9 @@ function find_slackbuild { # Find SlackBuild script in the repository [ $# -ne 1 ] && handle_error $ERROR_PAR_NUMBER - find $SLACKBUILDS_DIR -iname $1.SlackBuild - EXIT_CODE=$? + OUTPUT=`find $SLACKBUILDS_DIR -iname $1.SlackBuild` + [ "$OUTPUT" =! "" ] && EXIT_CODE=0 || EXIT_CODE=1 + echo $OUTPUT } function info_builds { @@ -303,18 +304,18 @@ case $1 in '--all'|'-a') # build all SlackBuilds in repository build_all_slackbuild - exit 0 + exit $EXIT_CODE ;; '--search'|'-s') [ $# -ne 2 ] && usage # two parameters is required find_slackbuild $2 - exit 0 + exit $EXIT_CODE ;; '--info'|'-f') [ $# -ne 2 ] && usage # two parameters is required PKG_PATH=`find_slackbuild $2` info_builds - exit 0 + exit $EXIT_CODE ;; '--install'|'-i') [ $# -ne 2 ] && usage # two parameters is required @@ -333,15 +334,15 @@ case $1 in ;; '--sync') sync_repo $SLACKBUILDS_DIR $SLACKBUILDS_SVN - exit 0 + exit $EXIT_CODE ;; '--help'|'-h'|'') usage - exit 0 + exit $EXIT_CODE ;; '--list'|'-l') list_builds - exit 0 + exit $EXIT_CODE ;; *) if [ "${1:0:1}" != "-" ]; then |