diff options
Diffstat (limited to 'rpm-local/import-obs.sh')
-rwxr-xr-x | rpm-local/import-obs.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/rpm-local/import-obs.sh b/rpm-local/import-obs.sh new file mode 100755 index 0000000..d1d0e8c --- /dev/null +++ b/rpm-local/import-obs.sh @@ -0,0 +1,28 @@ +#!/bin/sh -e +DIR="$(cd "$(dirname "$0")" && pwd -P)" +OBSSRC=~/code/obs +PROJ=openSUSE:Factory +PKGNAME="$1" + +if [ -z "$PKGNAME" ]; then + echo "usage: $(basename $0) PKGNAME" + exit 1 +fi + +set -x +cd "$OBSSRC" +if ! [ -e "$PROJ/$PKGNAME" ]; then + osc co "$PROJ" "$PKGNAME" +fi + +cd "$DIR/spec" +if [ -d "$PKGNAME" ]; then + rm -r "$PKGNAME" +fi + +mkdir "$PKGNAME" +cd "$PKGNAME" +cp -v "$OBSSRC/$PROJ/$PKGNAME/"* . + +cd "$DIR" +./obs-clean.sh |