aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2020-05-11 12:08:34 +0200
committerOliver Smith <osmith@sysmocom.de>2020-05-11 12:08:34 +0200
commit4ab70d9b74a38df7549e62d3092ce85a93384ed5 (patch)
tree0617a179e36e27ef15fcce99750a8f8ab41e5f98
parentdceee1bacd35ded7172d95b6a05f18a802f73310 (diff)
import-fedora.sh: import pkg from fedora
-rwxr-xr-xrpm-local/import-fedora.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/rpm-local/import-fedora.sh b/rpm-local/import-fedora.sh
new file mode 100755
index 0000000..1add7c9
--- /dev/null
+++ b/rpm-local/import-fedora.sh
@@ -0,0 +1,27 @@
+#!/bin/sh -e
+DIR="$(cd "$(dirname "$0")" && pwd -P)"
+FEDORASRC=~/code/fedora
+BRANCH=f31
+PKGNAME="$1"
+
+if [ -z "$PKGNAME" ]; then
+ echo "usage: $(basename $0) PKGNAME"
+ exit 1
+fi
+
+set -x
+cd "$FEDORASRC"
+if ! [ -e "$PKGNAME" ]; then
+ git clone "https://src.fedoraproject.org/rpms/$PKGNAME"
+fi
+cd "$PKGNAME"
+git checkout "$BRANCH"
+
+cd "$DIR/spec"
+if [ -d "$PKGNAME" ]; then
+ rm -r "$PKGNAME"
+fi
+
+mkdir "$PKGNAME"
+cd "$PKGNAME"
+cp -v "$FEDORASRC/$PKGNAME/"* .