File: config.sh

package info (click to toggle)
ocaml-afl-persistent 1.4-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 128 kB
  • sloc: ml: 100; sh: 49; makefile: 11
file content (21 lines) | stat: -rwxr-xr-x 398 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

set -e
tmpdir="$(mktemp -d 2>/dev/null || mktemp -d -t 'mytmpdir')"
output="$(pwd)/afl-persistent.config"
cd "$tmpdir"
echo 'print_string "Hello"' > test.ml
if ocamlopt -dcmm -c test.ml 2>&1 | grep -q caml_afl; then
    afl_always=true
else
    afl_always=false
fi
rm test.*
cd /
rmdir "$tmpdir"

cat > "$output" <<EOF
opam-version: "1.2"
afl-available: true
afl-always: $afl_always
EOF