File: orig-tar.sh

package info (click to toggle)
pdfsam 1.1.4-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 4,132 kB
  • ctags: 3,154
  • sloc: java: 17,003; xml: 1,332; cpp: 378; sh: 141; makefile: 20
file content (19 lines) | stat: -rwxr-xr-x 451 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh -e

# called by uscan with '--upstream-version' <version> <file>
DIR=pdfsam-$2
TAR=../pdfsam_$2.orig.tar.gz

# clean up the upstream tarball
mkdir $DIR
unzip $3 -d $DIR
(cd $DIR && for ZIP in *.zip; do unzip $ZIP; rm -f $ZIP; done)
tar -c -z -f $TAR -X debian/orig-tar.exclude $DIR
rm -rf $DIR $3

# move to directory 'tarballs'
if [ -r .svn/deb-layout ]; then
    . .svn/deb-layout
    mv $TAR $origDir
    echo "moved $TAR to $origDir"
fi