]> git.decadent.org.uk Git - ion3.git/blobdiff - debian/get-orig-source
Started renaming.
[ion3.git] / debian / get-orig-source
index 35cca88cb7baa551231fe0fec11879710eb2f8c4..c990c05ede47f1c19d3a361436e6c713bc274564 100755 (executable)
@@ -2,6 +2,9 @@
 
 set -e
 
+PACKAGE="$(dpkg-parsechangelog | sed 's/^Source: //; t; d')"
+test -n "$PACKAGE"
+
 # Get the main upstream tarball URL and version via uscan.
 while read line; do
     if [ "${line#http://}" != "$line" -a "${line#* }" = "$line" ]; then
@@ -31,9 +34,9 @@ test -z "$(tar tzf $doc_file | grep -v "^$doc_dir/")"
 # Unpack, combine and repack.
 tar xzf $main_file
 tar xzf $doc_file
-mv $main_dir ion3-$version.orig
-mv $doc_dir ion3-$version.orig/doc
-tar cf - ion3-$version.orig | gzip -c9 > ion3_$version.orig.tar.gz
+mv $main_dir $PACKAGE-$version.orig
+mv $doc_dir $PACKAGE-$version.orig/doc
+tar cf - $PACKAGE-$version.orig | gzip -c9 > $PACKAGE_$version.orig.tar.gz
 
 # Clean up.
-rm -rf $main_file $doc_file ion3-$version.orig
+rm -rf $main_file $doc_file $PACKAGE-$version.orig