File: orig-tar.sh

package info (click to toggle)
apache-log4j1.2 1.2.17-7%2Bdeb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,880 kB
  • sloc: java: 35,228; xml: 4,813; cpp: 252; perl: 69; makefile: 30; sh: 14
file content (22 lines) | stat: -rwxr-xr-x 506 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh -e

# called by uscan with '--upstream-version' <version> <file>
VERSION=$2
ORIG_TAR=$3
TAR=../apache-log4j1.2_$VERSION.orig.tar.gz
DIR=apache-log4j1.2-$VERSION.orig

# clean up the upstream tarball
tar xvzf $ORIG_TAR
mv apache-log4j-$VERSION $DIR
GZIP=--best tar -c -z -f $TAR --exclude '*.jar' --exclude 'site' --exclude '*.dll' $DIR
rm -rf $DIR

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

exit 0