File: dist

package info (click to toggle)
at 3.1.23-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 660 kB
  • sloc: sh: 3,096; ansic: 2,487; yacc: 575; makefile: 203; lex: 91; perl: 62
file content (17 lines) | stat: -rwxr-xr-x 563 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash
set -e

PACKNAME=at
SOURCENAME=at
VER=$( grep AC_INIT configure.ac | cut -d ',' -f 2 | tr -d ' )' )
RELTAR=${SOURCENAME}_$VER.orig.tar.gz

echo $PACKNAME $SOURCENAME $VER
echo $RELTAR

[ ! -e ../$SOURCENAME-$VER ] || ( echo "Dir $SOURCENAME-$VER exist, aborting" ; exit 1 )
[ ! -e ../$RELTAR ] || ( echo "Release file $RELTAR exist, aborting" ; exit 2 )
mkdir ../$SOURCENAME-$VER
fakeroot tar --exclude=debian --exclude=.git -cf - . | tar -C ../$SOURCENAME-$VER -x
GZIP=-9 fakeroot tar -C .. -czf ../$RELTAR $SOURCENAME-$VER
rm -r ../$SOURCENAME-$VER