forked from tytso/xfstests-bld
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gen-tarball
executable file
·53 lines (47 loc) · 1.11 KB
/
gen-tarball
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
if test -f config.custom ; then
. config.custom
else
. config
fi
if test -n "$TOOLCHAIN_DIR" -a -d "$TOOLCHAIN_DIR"; then
PATH=$TOOLCHAIN_DIR/bin:$PATH
fi
if test -n "$CROSS_COMPILE" ; then
STRIP=$CROSS_COMPILE-strip
else
STRIP=strip
fi
while [ "$1" != "" ];
do
case $1 in
--fast)
fast=yes
;;
*)
echo "unknown option: $1"
exit 1
;;
esac
shift
done
which pigz &>/dev/null && GZIP=pigz || GZIP=gzip
echo "GEN xfstests"
rm -rf xfstests
if test "$fast" = "yes"
then
cp -r xfstests-dev xfstests
rm -rf xfstests/.git xfstests/autom4te.cache
else
(D=$(pwd) ; cd xfstests-dev ; make install PKG_LIB_DIR=$D/xfstests)
cp xfstests-dev/README* xfstests
fi
echo "xfstests-bld $(git describe --always --dirty) ($(git log -1 --pretty=%cD))" > xfstests-bld.ver
cat *.ver > xfstests/git-versions
mkdir -p xfstests/bin xfstests/lib
cp bld/bin/* bld/sbin/* xfstests/bin
cp bld/lib/client.txt xfstests/lib
echo "STRIP xfstests/*"
find xfstests -mindepth 2 -type f -perm /0111 | xargs $STRIP 2> /dev/null
echo "TAR xfstests"
tar cf - xfstests | $GZIP -9 > xfstests.tar.gz