diff options
author | rudson <rudson@04377dda-e619-0410-9926-eae83683ac58> | 2008-05-12 02:43:26 +0000 |
---|---|---|
committer | rudson <rudson@04377dda-e619-0410-9926-eae83683ac58> | 2008-05-12 02:43:26 +0000 |
commit | 28d94ce9c6bec73c01553b99c36aff59c1ed1ed7 (patch) | |
tree | d1193c21ba5d01d6d0926c65d786456c54d53d8a /trunk/src | |
parent | eb8940033560aea1d56ac7c34eea0de0af620635 (diff) | |
download | simplepkg-28d94ce9c6bec73c01553b99c36aff59c1ed1ed7.tar.gz simplepkg-28d94ce9c6bec73c01553b99c36aff59c1ed1ed7.tar.bz2 |
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@511 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'trunk/src')
-rw-r--r-- | trunk/src/createpkg | 19 | ||||
-rwxr-xr-x | trunk/src/mkbuild | 13 |
2 files changed, 19 insertions, 13 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 diff --git a/trunk/src/mkbuild b/trunk/src/mkbuild index e55dfb4..d961a53 100755 --- a/trunk/src/mkbuild +++ b/trunk/src/mkbuild @@ -19,7 +19,7 @@ # Based in model generic.SlackBuild of Luiz # # Version: -PROG_VERSION=1.2.6 +PROG_VERSION=1.2.7 PROG_NAME=`basename $0` #-------------------------------------------------------------------- @@ -263,7 +263,7 @@ function set_parameters { shift done - [ ! -e $MKBUILD_NAME ] && ACTION='new' + [ ! -e $MKBUILD_NAME -a $ACTION == "build" ] && ACTION='new' } @@ -929,8 +929,13 @@ if [ ! -z $MKBUILD_NAME ]; then [ $COMMIT_MKBUILD -eq $on ] && commit_mkbuild ;; 'search') - find $MKBUILDS_DIR -iname $MKBUILD_NAME - EXIT_CODE=$? + SEARCH=`find $MKBUILDS_DIR -iname $MKBUILD_NAME` + if [ "$SEARCH" == "" ]; then + EXIT_CODE=1 + else + EXIT_CODE=0 + echo $SEARCH + fi ;; esac fi |