summaryrefslogtreecommitdiff
path: root/debian/dfsg.sh
diff options
context:
space:
mode:
Diffstat (limited to 'debian/dfsg.sh')
-rwxr-xr-xdebian/dfsg.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/debian/dfsg.sh b/debian/dfsg.sh
new file mode 100755
index 0000000..2cfde87
--- /dev/null
+++ b/debian/dfsg.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+format=`echo $3 | sed "s/\(.*\.\)\(.*\)/\2/"`
+newname=`echo $3 | sed "s/\(\.orig\)/\+dfsg\1/"`
+case $format in
+ gz)
+ compr=gzip
+ ;;
+ bz2)
+ compr=bzip2
+ ;;
+ lzma)
+ compr=lzma
+ ;;
+ xz)
+ compr=xz
+ ;;
+esac
+$compr -d -c $3 | tar --wildcards --delete `cat debian/files.non-dfsg` | \
+$compr -9 -f > $newname
+rm -f $3