forked from OpenSC/OpenSC
-
Notifications
You must be signed in to change notification settings - Fork 3
/
bootstrap.ci
executable file
·53 lines (44 loc) · 1.09 KB
/
bootstrap.ci
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/sh
usage()
{
cat << EOF
usage: $0 options
OpenSC bootstrap
OPTIONS:
-h Show this message
-s Package suffix
-S Use package suffix as 'g' appended with the date of last commit
EOF
}
SUFFIX=
while getopts “:hs:S” OPTION
do
case $OPTION in
h)
usage
exit 1
;;
s)
SUFFIX=$OPTARG
;;
S)
SUFFIX=g`git log -1 --pretty=fuller --date=iso | grep CommitDate: | sed -E 's/^CommitDate:\s(.*)/\1/' | sed -E 's/(.*)-(.*)-(.*) (.*):(.*):(.*)\s+.*/\1\2\3\4\5\6/'`
;;
?)
usage
exit
;;
esac
done
set -e
if [ -f Makefile ]; then
make distclean
fi
rm -rf *~ *.cache config.guess config.log config.status config.sub depcomp ltmain.sh version.m4.ci
if [ -n "$SUFFIX" ]
then
echo Set package suffix "$SUFFIX"
sed 's/^define(\[PACKAGE_SUFFIX\],\s*\[\([-~]*[0-9a-zA-Z]*\)\])$/define(\[PACKAGE_SUFFIX\], \['$SUFFIX'\])/g' < version.m4 > version.m4.ci
fi
./bootstrap
# autoreconf --verbose --install --force || true