Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- src/usr/doc/contrib/sqg.orig 2013-02-26 11:59:23.507089085 +0100
- +++ src/usr/doc/contrib/sqg 2013-02-26 13:05:25.322821722 +0100
- @@ -35,22 +35,18 @@
- # If necessary, override SBOPKG_CONF below or directly from the environment.
- # The user may want to change QUEUEDIR to a local temporary directory in $HOME
- # since queuefiles in QUEUEDIR will be overwritten by this script. QUEUEDIR
- -# is commented out on purpose to get the user to review these variables.
- +# is set empty on purpose to get the user to review these variables.
- # QUEUEDIR must be writable by the user executing the script.
- #QUEUEDIR=${QUEUEDIR:-/var/lib/sbopkg/queues}
- -REPO_ROOT=${REPO_ROOT:-/var/lib/sbopkg}
- -REPO_NAME=${REPO_NAME:-SBo}
- -REPO_BRANCH=${REPO_BRANCH:-14.0}
- +QUEUEDIR=""
- ### NO CHANGES SHOULD BE NECESSARY BELOW THIS LINE ###
- -REPO_DIR=$REPO_ROOT/$REPO_NAME/$REPO_BRANCH
- -
- sanity_checks () {
- - if [[ ! -e $SBOPKG_CONF || ! -w $QUEUEDIR || ! -d $REPO_DIR ]]; then
- - echo "ERROR: $SBOPKG_CONF cannot be found or $QUEUEDIR"
- - echo "or $REPO_DIR do not exist or are not writable."
- + if [[ ! -e $SBOPKG_CONF || ! -w $QUEUEDIR ]]; then
- + echo "ERROR: $SBOPKG_CONF cannot be found or $QUEUEDIR do not exist"
- + echo "or is not writable."
- echo "Check the configurable variables at the top of the script."
- exit 1
- else
- @@ -116,8 +112,8 @@
- main_loop () {
- local MAINAPP="$1"
- if [[ $MAINAPP == "_all" ]]; then
- - printf "Processing all SlackBuilds in the $REPO_NAME/$REPO_BRANCH repo..."
- - for INFO in $(find $REPO_ROOT/$REPO_NAME/$REPO_BRANCH -name *.info); do
- + printf "Processing all SlackBuilds in the $REPO_SUBPATH repo..."
- + for INFO in $(find $REPO_DIR -name *.info); do
- printf "."
- . $INFO
- build_queuefile
- @@ -126,7 +122,7 @@
- for MAINAPP in $PKG; do
- if search_package $MAINAPP; then
- echo "Processing $MAINAPP."
- - . $REPO_ROOT/$REPO_NAME/$REPO_BRANCH/$PKGPATH/$MAINAPP.info
- + . $REPO_DIR/$PKGPATH/$MAINAPP.info
- build_queuefile
- else
- echo "$MAINAPP not found. Exiting."
- @@ -143,6 +139,15 @@
- esac
- sanity_checks
- +
- +# Set REPO_DIR correctly also in case of a git repository
- +if [ -d $REPO_ROOT/$REPO_NAME/.git ]; then
- + REPO_SUBPATH=$REPO_NAME
- +else
- + REPO_SUBPATH=$REPO_NAME/$REPO_BRANCH
- +fi
- +REPO_DIR=$REPO_ROOT/$REPO_SUBPATH
- +
- main_loop "$PKG"
- echo "Done."
- exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement