Skip to content

Commit 306c591

Browse files
committed
Use POSIX syntax
1 parent 7e02ba7 commit 306c591

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ test: all
5151

5252
# Auto-detection
5353
pre:
54-
@which fstar.exe >/dev/null 2>&1 || [ -x $(FSTAR_HOME)/bin/fstar.exe ] || \
54+
@command -v fstar.exe >/dev/null 2>&1 || [ -x $(FSTAR_HOME)/bin/fstar.exe ] || \
5555
{ echo "Didn't find fstar.exe in the path or in FSTAR_HOME (which is: $(FSTAR_HOME))"; exit 1; }
5656
@ocamlfind query fstarlib >/dev/null 2>&1 || [ -f $(FSTAR_HOME)/bin/fstarlib/fstarlib.cmxa ] || \
5757
{ echo "Didn't find fstarlib via ocamlfind or in FSTAR_HOME (which is: $(FSTAR_HOME)); run $(MAKE) -C $(FSTAR_HOME)/ulib/ml"; exit 1; }

build_local.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
#!/usr/bin/env bash
1+
#!/bin/sh
22
set -e
33

44
# Look for config.json file
55
FILE=".docker/build/config.json"
6-
if [[ ! -f $FILE ]]; then
6+
if [ ! -f $FILE ]; then
77
echo "File $FILE does not exist."
88
fi
99

1010
# In case you want to build windows, change agentOS here to windows-nt if OSTYPE is not working
1111
agentOS=linux
12-
if [[ "$OSTYPE" == "cygwin" ]]; then
12+
if [ "$OSTYPE" == "cygwin" ]; then
1313
agentOS=linux #windows-nt
1414
fi
1515

@@ -32,7 +32,7 @@ REQUESTEDBRANCHNAME=$(jq -c -r ".BranchName" "$FILE")
3232
REQUESTEDCOMMITID=$(jq -c -r ".BaseContainerImageTagOrCommitId" "$FILE")
3333
COMMITURL=$(jq -c -r ".GithubCommitUrl" "$FILE")/$REQUESTEDBRANCHNAME
3434

35-
if [[ $(jq -c -r ".BaseContainerImageTagOrCommitId" "$FILE") -ne "latest" ]]; then
35+
if [ "$(jq -c -r '.BaseContainerImageTagOrCommitId' "$FILE")" -ne "latest" ]; then
3636
COMMITURL=$(jq -c -r ".GithubCommitUrl" "$FILE")/$REQUESTEDCOMMITID
3737
fi
3838

kremlib/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ ROOTS = $(wildcard *.fst) $(wildcard *.fsti) $(wildcard ../runtime/*.fst) \
4747
clean: clean-c
4848
rm -rf *.checked *.source .depend
4949

50-
SHELL:=$(shell which bash)
50+
SHELL:=$(shell command -v bash)
5151

5252
clean-c:
5353
rm -rf dist out extract-all */*.o

src/Driver.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ let detect_fstar () =
221221
fstar_home := r;
222222
fstar := r ^^ "bin" ^^ "fstar.exe"
223223
with Not_found -> try
224-
fstar := read_one_line "which" [| "fstar.exe" |];
224+
fstar := read_one_line "sh" [| "-c"; "command -v fstar.exe" |];
225225
fstar_home := d (d !fstar);
226226
if not !Options.silent then
227227
KPrint.bprintf "FSTAR_HOME is %s (via fstar.exe in PATH)\n" !fstar_home

0 commit comments

Comments
 (0)