diff options
Diffstat (limited to 'branches/0.6/src/createpkg')
| -rw-r--r-- | branches/0.6/src/createpkg | 43 | 
1 files changed, 20 insertions, 23 deletions
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  | 
