blob: 82601e8406f7cc314eeacd831c8f27f5b3532772 (
plain)
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
27
28
|
#!/bin/sh
PKG="openlmi-providers"
if [ $# -lt 1 ];
then
printf "Usage: %s GIT-COMMITISH\n(see git describe)\n" $0
exit 1
fi
VERSION=$(git describe $1 | sed 's/-/_/g')
if [ $? -ne 0 ];
then
exit 2
fi
if [ -f "$PKG-$VERSION.tar.gz" ];
then
printf "Archive $PKG-$VERSION.tar.gz already exists\n"
exit 3
fi
git archive --format=tar --prefix=$PKG-$VERSION/ $1 | gzip > $PKG-$VERSION.tar.gz
res=$?
printf "$PKG-$VERSION.tar.gz\n"
exit $?
|