File: build-abnfgen.sh

package info (click to toggle)
php-phpstan-phpdoc-parser 2.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,496 kB
  • sloc: php: 21,857; makefile: 50; xml: 42; sh: 17
file content (22 lines) | stat: -rwxr-xr-x 542 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
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
ROOT_DIR="$DIR"

if [[ ! -d "$ROOT_DIR/tools/abnfgen" ]]; then
	rm -rf "$ROOT_DIR/temp/abnfgen"
	mkdir -p "$ROOT_DIR/temp/abnfgen"

	tar xf "$ROOT_DIR/tests/abnfgen-0.20.tar.gz" \
		--directory "$ROOT_DIR/temp/abnfgen" \
		--strip-components 1

	cd "$ROOT_DIR/temp/abnfgen"
	./configure
	make

	mkdir -p "$ROOT_DIR/tools/abnfgen"
	mv abnfgen "$ROOT_DIR/tools/abnfgen"
	rm -rf "$ROOT_DIR/temp/abnfgen" "$ROOT_DIR/temp/abnfgen.tar.gz"
fi