diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 14:21:38 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 14:21:38 +0000 |
commit | 79dc7fa6e0ac4dca362661c6ca259f5d9dcf86fd (patch) | |
tree | da6a31a635fd1ec15162ef3881ad5ba19f00ff51 /debian/get-orig-source.sh | |
parent | Adding upstream version 7.0.14. (diff) | |
download | virtualbox-ext-pack-debian/7.0.14-1.tar.xz virtualbox-ext-pack-debian/7.0.14-1.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 '')
-rwxr-xr-x | debian/get-orig-source.sh | 30 |
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" |