summaryrefslogtreecommitdiff
path: root/media-sound/csound/files/repackage.sh
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-01-15 15:51:32 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-01-15 15:51:32 +0000
commit21435953e16cda318a82334ddbadb3b5c36d9ea7 (patch)
treee1810a4b135afce04b34862ef0fab2bfaeb8aeca /media-sound/csound/files/repackage.sh
parent7bc9c63c9da678a7e6fceb095d56c634afd22c56 (diff)
gentoo resync : 15.01.2020
Diffstat (limited to 'media-sound/csound/files/repackage.sh')
-rw-r--r--media-sound/csound/files/repackage.sh35
1 files changed, 35 insertions, 0 deletions
diff --git a/media-sound/csound/files/repackage.sh b/media-sound/csound/files/repackage.sh
new file mode 100644
index 000000000000..fea97d24a46f
--- /dev/null
+++ b/media-sound/csound/files/repackage.sh
@@ -0,0 +1,35 @@
+#! /bin/bash
+
+# Adjusted from OpenSUSE script
+# Source: https://build.opensuse.org/package/view_file/openSUSE:Factory/csound/pre_checkin.sh
+
+VERSION="${1}"
+
+if [[ -z "${VERSION}" ]]; then
+ echo "Version must be specified"
+ exit 1
+fi
+
+rm -f *.tar.*
+
+wget https://github.com/csound/csound/archive/${VERSION}.tar.gz || exit 1
+
+echo -e "\n\nUnpacking tarball\n"
+tar -xf ${VERSION}.tar.gz
+
+echo -e "Removing undistibutable files\n"
+rm -f csound-${VERSION}/Opcodes/scansyn*
+
+echo -e "Creating distributable tarball\n"
+tar -acf csound-${VERSION}-distributable.tar.xz csound-${VERSION}
+
+echo -e "Cleaning up\n"
+rm -rf csound-${VERSION} ${VERSION}.tar.gz
+
+if ! test -e ${VERSION}.tar.gz; then
+ echo "success"
+ exit 0
+else
+ echo "error"
+ exit 1
+fi