diff options
author | rudson <rudson@04377dda-e619-0410-9926-eae83683ac58> | 2007-08-07 16:35:54 +0000 |
---|---|---|
committer | rudson <rudson@04377dda-e619-0410-9926-eae83683ac58> | 2007-08-07 16:35:54 +0000 |
commit | c321c597e63e200d33d499e395d5269b48e90b6f (patch) | |
tree | 02858d29a43c210a02cbb273b3672afeeb97d81b /trunk/src/mkbuild | |
parent | 4df937a7ae3f4ba3b5b37478262da8119521524b (diff) | |
download | simplepkg-c321c597e63e200d33d499e395d5269b48e90b6f.tar.gz simplepkg-c321c597e63e200d33d499e395d5269b48e90b6f.tar.bz2 |
mkbuild-1.0.2: correção a opção commit. O gentoo adicionou um gif que estava dando erro na filtragem do path do slackbuild. Troquei o filtro para algo mais funcional, de forma que alterações posteriores possam ser melhor suportadas.
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@412 04377dda-e619-0410-9926-eae83683ac58
Diffstat (limited to 'trunk/src/mkbuild')
-rwxr-xr-x | trunk/src/mkbuild | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/trunk/src/mkbuild b/trunk/src/mkbuild index dc46253..d02dbbd 100755 --- a/trunk/src/mkbuild +++ b/trunk/src/mkbuild @@ -18,8 +18,8 @@ # # Based in model generic.SlackBuild of Luiz # -# Version 1.0.1 -PROG_VERSION=1.0.1 +# Version 1.0.2 +PROG_VERSION=1.0.2 PROG_NAME=`basename $0` #-------------------------------------------------------------------- @@ -436,6 +436,13 @@ function change_others_parameters { done } +function get_slackbuild_path { + + # Search SlackBuild Path in gentoo tree + eval "lynx -connect_timeout=10 -dump http://gentoo-portage.com/Search?search=$PKG_NAME | tr -d ' ' | grep '^[a-z].*\/$PKG_NAME\$' | head --lines=1" + +} + function commit_slackbuild { # Commit SlackBuild in local Slack.Sarava tree @@ -450,15 +457,18 @@ function commit_slackbuild { # Get SlackBuild path # Get SlackBuild path in parameter file SLACKBUILD_PATH=`validate_parameter "$SLACKBUILD_PATH" "SLACKBUILD PATH" ""` + [ $VERBOSE -eq $on ] && echo "[[SLACKBUILD PATH]]=\"$SLACKBUILD_PATH\"" + # Get SlackBuild path in slackbuild local tree - if [ $? -ne 0 ]; then + if [ -z $SLACKBUILD_PATH ]; then SLACKBUILD_PATH=`find $SLACKBUILDS_DIR -name $SLACKBUILD | xargs dirname` fi + # Get SlackBuild path in gentoo-portage tree - if [ "$SLACKBUILD_PATH" == "" ]; then + if [ -z $SLACKBUILD_PATH ]; then # Mount SlackBuild path [ $VERBOSE -eq $on ] && echo -e "\nFind SlackBuild PATH in Slack.Sarava tree..." - AUX=`lynx -connect_timeout=10 -dump http://gentoo-portage.com/Search?search=$PKG_NAME | sed -n '/Results:/,+1 { /Results:/ b ; p }' | head --lines=1 | tr -d " "` + AUX=`get_slackbuild_path` [ ! -z $AUX ] && SLACKBUILD_PATH="`dirname $AUX | tr - /`/`basename $AUX`" || SLACKBUILD_PATH="others/unclassified/$PKG_NAME" fi |