summaryrefslogtreecommitdiffstats
path: root/debian/get-orig-source.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 14:21:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 14:21:38 +0000
commit79dc7fa6e0ac4dca362661c6ca259f5d9dcf86fd (patch)
treeda6a31a635fd1ec15162ef3881ad5ba19f00ff51 /debian/get-orig-source.sh
parentAdding upstream version 7.0.14. (diff)
downloadvirtualbox-ext-pack-79dc7fa6e0ac4dca362661c6ca259f5d9dcf86fd.tar.xz
virtualbox-ext-pack-79dc7fa6e0ac4dca362661c6ca259f5d9dcf86fd.zip
Adding debian version 7.0.14-1.debian/7.0.14-1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/get-orig-source.sh')
-rwxr-xr-xdebian/get-orig-source.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/debian/get-orig-source.sh b/debian/get-orig-source.sh
new file mode 100755
index 0000000..dfc4bdc
--- /dev/null
+++ b/debian/get-orig-source.sh
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+set -ex
+
+if [ $# -ne 2 ]; then
+ echo "Error: 2 parameters are required."
+ exit 1
+fi
+
+if [ "$1" != "--upstream-version" ]; then
+ echo "Error: First parameter needs to be --upstream-version."
+ exit 1
+fi
+
+UPSTREAM_VERSION=$2
+
+PACKAGE_NAME=`awk '/^Source: / { print $2 }' debian/control`
+
+if [ -z "${PACKAGE_NAME}" ]; then
+ echo "Error: couldn't determine package name."
+ exit 1
+fi
+
+mkdir ${PACKAGE_NAME}_${UPSTREAM_VERSION}
+tar cJvf ${PACKAGE_NAME}_${UPSTREAM_VERSION}.orig.tar.xz ${PACKAGE_NAME}_${UPSTREAM_VERSION}
+rm -rf ${PACKAGE_NAME}_${UPSTREAM_VERSION}
+mv ${PACKAGE_NAME}_${UPSTREAM_VERSION}.orig.tar.xz ..
+
+echo "Done, now you can run:"
+echo "gbp import-orig ../${PACKAGE_NAME}_${UPSTREAM_VERSION}.orig.tar.xz"