Skip to content

Commit

Permalink
Fix the axiom diagnostics script (#350)
Browse files Browse the repository at this point in the history
* Fix the axiom diagnostics script.

* Use a local temporary directory instead of one in /tmp

* Use /usr/bin/env bash instead of /bin/sh
  • Loading branch information
wkolowski authored Dec 14, 2023
1 parent 79bb493 commit 8d78c35
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions scripts/axiom-diagnostics.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/sh

#!/usr/bin/env bash

# If argument $1 is not present, print usage info and exit.
if test -z "$1"
Expand Down Expand Up @@ -38,7 +37,7 @@ then
fi

# Create a temporary directory to hold intermediate results.
tmp=$(mktemp -d)
tmp=$(mktemp -d -p .)

# Find all Coq source files to be parsed.
for filepath in $(find $dir -name "*.v")
Expand All @@ -49,7 +48,7 @@ do
sed \
-e 's/\.\.\///' \
-e 's/\.\///' \
-e 's/theories\//Require Import /' \
-e 's/theories\//From VLSM Require Import /' \
-e 's/\//./g' \
-e 's/\.v/./' \
>> "$tmp/tmp"
Expand Down

0 comments on commit 8d78c35

Please sign in to comment.