File: orig-tar.sh

package info (click to toggle)
wcc 0.0.2+dfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 9,128 kB
  • sloc: ansic: 112,224; asm: 1,160; makefile: 1,064; pascal: 133; cpp: 119; sh: 80
file content (26 lines) | stat: -rwxr-xr-x 724 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh -e

set -x
# called by uscan with '--upstream-version' <version> <file>
PKG=wcc
UPSTREAMURL=https://github.com/endrazine/wcc.git
DIR=$PKG-$2
TAR=../${PKG}_$2+dfsg.orig.tar.gz

# get back the official wcc git repo, seems to be needed to regenerate the
# submodules content
# its git directory will be used to call git submodule update --init (see
# below)
tmpdir=`mktemp -d`
git clone ${UPSTREAMURL} ${tmpdir}/wcc

tar xvf $3
cd $DIR && cp -r ${tmpdir}/wcc/.git .git && git submodule update --init && rm -rf .git && cd $OLDPWD

# clean up the upstream tarball, yet not needed as copyright file seems to do
# the job also (orig-tar.exclude to delete ?)
tar -c -z -f $TAR $DIR
rm -rf $DIR $3
rm -rf ${tmpdir}

exit 0