Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Feb 26th, 2013  |  syntax: None  |  size: 1.88 KB  |  views: 49  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. --- work/sbopkg/src/usr/doc/contrib/sqg 2013-02-25 20:12:21.318922460 -0500
  2. +++ ./sqg       2013-02-26 16:37:37.939838255 -0500
  3. @@ -45,17 +45,25 @@ REPO_BRANCH=${REPO_BRANCH:-14.0}
  4.  
  5.  ### NO CHANGES SHOULD BE NECESSARY BELOW THIS LINE ###
  6.  
  7. -REPO_DIR=$REPO_ROOT/$REPO_NAME/$REPO_BRANCH
  8. -
  9.  sanity_checks () {
  10. -  if [[ ! -e $SBOPKG_CONF || ! -w $QUEUEDIR || ! -d $REPO_DIR ]]; then
  11. -    echo "ERROR: $SBOPKG_CONF cannot be found or $QUEUEDIR"
  12. -    echo "or $REPO_DIR do not exist or are not writable."
  13. +  if [[ ! -e $SBOPKG_CONF ]]; then
  14. +    echo "$SBOPKG_CONF not found."
  15.      echo "Check the configurable variables at the top of the script."
  16.      exit 1
  17.    else
  18.      . $SBOPKG_CONF
  19.    fi
  20. +  if [ -d $REPO_ROOT/$REPO_NAME/.git ]; then
  21. +    REPO_SUBPATH=$REPO_NAME
  22. +  else
  23. +    REPO_SUBPATH=$REPO_NAME/$REPO_BRANCH
  24. +  fi
  25. +  REPO_DIR=$REPO_ROOT/$REPO_SUBPATH
  26. +  if [[ ! -w $QUEUEDIR || ! -d $REPO_DIR ]]; then
  27. +    echo "ERROR: $QUEUEDIR or $REPO_DIR do not exit or are not writable."
  28. +    echo "Check the configurable variables at the top of the script."
  29. +    exit 1
  30. +  fi
  31.  }
  32.  
  33.  usage() {
  34. @@ -116,8 +124,8 @@ build_queuefile () {
  35.  main_loop () {
  36.    local MAINAPP="$1"
  37.    if [[ $MAINAPP == "_all" ]]; then
  38. -    printf "Processing all SlackBuilds in the $REPO_NAME/$REPO_BRANCH repo..."
  39. -    for INFO in $(find $REPO_ROOT/$REPO_NAME/$REPO_BRANCH -name *.info); do
  40. +    printf "Processing all SlackBuilds in the $REPO_SUBPATH repo..."
  41. +    for INFO in $(find $REPO_DIR -name *.info); do
  42.        printf "."
  43.        . $INFO
  44.        build_queuefile
  45. @@ -126,7 +134,7 @@ main_loop () {
  46.      for MAINAPP in $PKG; do
  47.        if search_package $MAINAPP; then
  48.          echo "Processing $MAINAPP."
  49. -        . $REPO_ROOT/$REPO_NAME/$REPO_BRANCH/$PKGPATH/$MAINAPP.info
  50. +        . $REPO_DIR/$PKGPATH/$MAINAPP.info
  51.          build_queuefile
  52.        else
  53.          echo "$MAINAPP not found.  Exiting."
clone this paste RAW Paste Data