Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

check_package*: allow prepending to REPO

This is usefull when building in abother BS and want to prepend
strings like "openSUSE.org:".
  • Loading branch information...
commit a928629e87cd25c7858b01b828c6f1c2fdb5253b 1 parent 05f9652
Jiri Slaby authored
Showing with 12 additions and 2 deletions.
  1. +6 −1 check_package
  2. +6 −1 check_packages
View
7 check_package
@@ -20,6 +20,8 @@
OSC_API="https://api.opensuse.org"
+PREPEND=""
+
# Main Tumbleweed repository location
TUMBLE_REPO="openSUSE:Tumbleweed"
@@ -95,6 +97,9 @@ while [ "$1" != "" ]; do
--api ) shift
OSC_API="$1"
;;
+ --prepend ) shift
+ PREPEND="$1"
+ ;;
* ) FULL_PACKAGE=$1
;;
esac
@@ -106,7 +111,7 @@ done
# I'm sure that bash regex can do this better, but hey, this works...
-REPO=`echo $FULL_PACKAGE | cut -f 1 -d '/'`
+REPO=$PREPEND`echo $FULL_PACKAGE | cut -f 1 -d '/'`
PACKAGE=`echo $FULL_PACKAGE | cut -f 2 -d '/'`
#echo $REPO
#echo $PACKAGE
View
7 check_packages
@@ -22,6 +22,8 @@
OSC_API=""
+PREPEND=""
+
# Default package list filename. Override it on the command line
# if you want something else
FILE="package_list"
@@ -47,6 +49,9 @@ while [ "$1" != "" ]; do
--api ) shift
OSC_API="--api $1"
;;
+ --prepend ) shift
+ PREPEND="--prepend $1"
+ ;;
* ) FILE=$1
;;
esac
@@ -64,6 +69,6 @@ do
fi
if [ "$line" != "" ]
then
- ./check_package $OSC_API --repo $REPO $line
+ ./check_package $OSC_API $PREPEND --repo $REPO $line
fi
done < $FILE
Please sign in to comment.
Something went wrong with that request. Please try again.