From f7332d5b35ca91cfbea22904d88a72af38cdf6bd Mon Sep 17 00:00:00 2001 From: rudson Date: Sun, 22 Apr 2007 20:08:26 +0000 Subject: createpkg-1.0.5.2: alterado a variável REPOS para MAKEPKG_REPOS. Funciona somente com os SlackBuilds com REPOS. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@358 04377dda-e619-0410-9926-eae83683ac58 --- branches/0.6/src/createpkg | 43 ++++++++++++++++++++----------------------- 1 file changed, 20 insertions(+), 23 deletions(-) (limited to 'branches/0.6/src/createpkg') diff --git a/branches/0.6/src/createpkg b/branches/0.6/src/createpkg index 757972e..39063ca 100644 --- a/branches/0.6/src/createpkg +++ b/branches/0.6/src/createpkg @@ -31,24 +31,7 @@ # Createpkg functions #--------------------------------------------------- -CREATEPKG_VERSION="1.0.5.1" - -# Start common.sh functions -COMMON="/usr/libexec/simplepkg/common.sh" -BASENAME="`basename $0`" - -if [ -f "$COMMON" ]; then - source $COMMON -else - echo "error: file $COMMON found, check your $BASENAME installation" - mk_exit 0 -fi - -# Load simplepkg.conf variables -eval_config $BASENAME - -# Enable debug mode -#set -x +CREATEPKG_VERSION="1.0.5.2" function error_codes { @@ -237,7 +220,7 @@ function sync_repo { # Synchronize repository cd $SLACKBUILDS_DIR - svn update || build_repo + exit # svn update || build_repo #simplaret --update } @@ -355,6 +338,20 @@ function color_select { # Common functions COMMON="/usr/libexec/simplepkg/common.sh" SIMPLEPKG_CONF="/etc/simplepkg/simplepkg.conf" +BASENAME="`basename $0`" + +if [ -f "$COMMON" ]; then + source $COMMON +else + echo "error: file $COMMON found, check your $BASENAME installation" + mk_exit 0 +fi + +# Load simplepkg.conf variables +eval_config $BASENAME + +# Enable debug mode +#set -x # Loading error codes error_codes @@ -503,16 +500,16 @@ eecho $messag "$BASENAME: processing $SCRIPT_NAME" cd $SCRIPT_BASE # Execute SlackBuild script with variables protection -( INTERACT=no sh ./$SCRIPT_NAME ) +( REPOS=$MAKEPKG_REPOS INTERACT=no sh ./$SCRIPT_NAME ) # Check if package was built handle_error $? $PACKAGE # Get package name -PKG_NAME="`ls -1 -c $REPOS/$PACKAGE-*-*-*.tgz | head -n 1 | xargs basename`" +PKG_NAME="`ls -1 -c $MAKEPKG_REPOS/$PACKAGE-*-*-*.tgz | head -n 1 | xargs basename`" # Select repository directory -NEW_REPOS=$REPOS/$( echo ${SCRIPT_BASE#$SLACKBUILDS_DIR/} ) +[ $MOVE_BIN_PACKAGE -eq 0 ] && NEW_REPOS=$MAKEPKG_REPOS/$( echo ${SCRIPT_BASE#$SLACKBUILDS_DIR/} ) || NEW_REPOS=$MAKEPKG_REPOS # Create repository directory [ ! -e $NEW_REPOS ] && mkdir -p $NEW_REPOS 2>/dev/null @@ -521,7 +518,7 @@ NEW_REPOS=$REPOS/$( echo ${SCRIPT_BASE#$SLACKBUILDS_DIR/} ) [ $REMOVE_OLD_PACKAGE -eq 0 ] && rm $NEW_REPOS/$PACKAGE-*-*-*.tgz 2>/dev/null # Move package to SlackBuilds-like tree -[ $MOVE_BIN_PACKAGE -eq 0 ] && mv $REPOS/$PKG_NAME $NEW_REPOS/ +[ $MOVE_BIN_PACKAGE -eq 0 ] && mv $MAKEPKG_REPOS/$PKG_NAME $NEW_REPOS/ # Install package if [ "$INSTALL" == "1" ]; then -- cgit v1.2.3