diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 14:20:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 14:20:29 +0000 |
commit | 795461eec2248074b8dffcaad5baa81f7de51132 (patch) | |
tree | 9167d1aea21e276e7d3a9f8d29b11972b21236a4 /debian/get-orig-source.sh | |
parent | Adding upstream version 7.0.14. (diff) | |
download | virtualbox-guest-additions-iso-795461eec2248074b8dffcaad5baa81f7de51132.tar.xz virtualbox-guest-additions-iso-795461eec2248074b8dffcaad5baa81f7de51132.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-x | debian/get-orig-source.sh | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/debian/get-orig-source.sh b/debian/get-orig-source.sh new file mode 100755 index 0000000..0a48acc --- /dev/null +++ b/debian/get-orig-source.sh @@ -0,0 +1,51 @@ +#!/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 +ORIG_TARBALL=`readlink -e ../`/VBoxGuestAdditions_${UPSTREAM_VERSION}.iso + +ORGDIR=`pwd` + +cd `dirname ${ORIG_TARBALL}` +if ! wget -O - http://download.virtualbox.org/virtualbox/${UPSTREAM_VERSION}/SHA256SUMS | grep iso | sha256sum -c --strict -; then + echo "Error: checksum doesn't match." + exit 1 +fi +cd ${ORGDIR} + +PACKAGE_NAME=`awk '/^Source: / { print $2 }' debian/control` + +if [ -z "${PACKAGE_NAME}" ]; then + echo "Error: couldn't determine package name." + exit 1 +fi + +TMP=`mktemp -d` + +if [ -z "${TMP}" ]; then + echo "Error: couldn't create a tmp dir." + exit 1 +fi + +trap 'rm -r ${TMP}' EXIT + +mkdir ${TMP}/${PACKAGE_NAME}-${UPSTREAM_VERSION} +mv ${ORIG_TARBALL} ${TMP}/${PACKAGE_NAME}-${UPSTREAM_VERSION}/ +cd ${TMP} +tar cJf ${PACKAGE_NAME}_${UPSTREAM_VERSION}.orig.tar.xz ${PACKAGE_NAME}-${UPSTREAM_VERSION} +mv ${PACKAGE_NAME}_${UPSTREAM_VERSION}.orig.tar.xz ${ORGDIR}/../ +cd ${ORGDIR} + +echo "Done, now you can run:" +echo "gbp import-orig ../${PACKAGE_NAME}_${UPSTREAM_VERSION}.orig.tar.xz" |