File: bootstrap.ci

package info (click to toggle)
opensc 0.23.0-0.3%2Bdeb12u2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 15,868 kB
  • sloc: ansic: 177,824; xml: 6,009; sh: 1,807; makefile: 968; cpp: 302; lex: 92
file content (53 lines) | stat: -rwxr-xr-x 1,124 bytes parent folder | download | duplicates (3)
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 m4/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' < m4/version.m4 > m4/version.m4.ci
fi

./bootstrap
# autoreconf --verbose --install --force || true