A few fixes to make things more posix compliant in build/test scripts

This commit is contained in:
Alain Mebsout 2017-04-12 12:55:01 +02:00 committed by Grégoire Henry
parent e12e0e9a5b
commit 8777349a19
8 changed files with 13 additions and 13 deletions

View File

@ -2,7 +2,7 @@
set -e set -e
script_dir="$(dirname "$(readlink -f "$0")")" script_dir="$(cd "$(dirname "$0")" && echo "$(pwd -P)/")"
src_dir="$(dirname "$script_dir")" src_dir="$(dirname "$script_dir")"
cd "$src_dir" cd "$src_dir"

View File

@ -2,7 +2,7 @@
set -e set -e
script_dir="$(dirname "$(readlink -f "$0")")" script_dir="$(cd "$(dirname "$0")" && echo "$(pwd -P)/")"
src_dir="$(dirname "$script_dir")" src_dir="$(dirname "$script_dir")"
cd "$src_dir" cd "$src_dir"

View File

@ -1,6 +1,6 @@
#! /bin/sh #! /bin/sh
script_dir="$(dirname "$(readlink -f "$0")")" script_dir="$(cd "$(dirname "$0")" && echo "$(pwd -P)/")"
src_dir="$(dirname "$script_dir")" src_dir="$(dirname "$script_dir")"
. "$script_dir/version.sh" . "$script_dir/version.sh"
@ -54,7 +54,7 @@ if "$pin"; then
opam pin add typerex-build --dev --no-action opam pin add typerex-build --dev --no-action
## Force opam to take account of the new `tezos-deps.opam` ## Force opam to take account of the new `tezos-deps.opam`
opam pin --yes remove tezos-deps opam pin --yes remove tezos-deps
opam pin --yes add --no-action tezos-deps src opam pin --yes add --no-action tezos-deps $src_dir/src
fi fi
if "$depext"; then if "$depext"; then

View File

@ -2,7 +2,7 @@
set -e set -e
script_dir="$(dirname "$(readlink -f "$0")")" script_dir="$(cd "$(dirname "$0")" && echo "$(pwd -P)/")"
src_dir="$(dirname "$script_dir")" src_dir="$(dirname "$script_dir")"
cd "$src_dir" cd "$src_dir"

View File

@ -2,7 +2,7 @@
set -e set -e
script_dir="$(dirname "$(readlink -f "$0")")" script_dir="$(cd "$(dirname "$0")" && echo "$(pwd -P)/")"
src_dir="$(dirname "$script_dir")" src_dir="$(dirname "$script_dir")"
cd "$src_dir" cd "$src_dir"

View File

@ -314,7 +314,7 @@ partial-clean::
.PHONY: clean partial-clean .PHONY: clean partial-clean
clean:: partial-clean clean:: partial-clean
partial-clean:: partial-clean::
-find \( -name \*.cm\* -or -name \*.cmp -or -name \*.out -or -name \*~ -or -name \*.o -or -name \*.a \) -delete -find . \( -name \*.cm\* -or -name \*.cmp -or -name \*.out -or -name \*~ -or -name \*.o -or -name \*.a \) -delete
## Dependencies ## Dependencies
@ -366,8 +366,8 @@ compiler/tezos_compiler.cmo compiler/tezos_compiler.cmx: \
partial-clean:: partial-clean::
-rm -f .depend -rm -f .depend
-find \( -name \*.mli.deps -or -name \*.ml.deps \) -delete -find . \( -name \*.mli.deps -or -name \*.ml.deps \) -delete
-find \( -name \*.mli.deps.byte -or -name \*.ml.deps.byte \) -delete -find . \( -name \*.mli.deps.byte -or -name \*.ml.deps.byte \) -delete
## Embedded protocol modules ## Embedded protocol modules

View File

@ -79,10 +79,10 @@ ${SRCDIR}/client/%: ${CLIENTLIB}
.PHONY: clean partial-clean .PHONY: clean partial-clean
clean:: partial-clean clean:: partial-clean
partial-clean:: partial-clean::
-find \( -name \*.cm\* -or -name \*.cmp -or -name \*.out -or -name \*~ -or -name \*.o -or -name \*.a \) -delete -find . \( -name \*.cm\* -or -name \*.cmp -or -name \*.out -or -name \*~ -or -name \*.o -or -name \*.a \) -delete
-include .depend -include .depend
.depend: $(shell find -name \*.ml -or -name \*.ml) .depend: $(shell find . -name \*.ml -or -name \*.ml)
@echo OCAMLDEP "(test/$(notdir $(shell echo $$PWD)))" @echo OCAMLDEP "(test/$(notdir $(shell echo $$PWD)))"
@$(OCAMLDEP) -native $(INCLUDES) $^ > .depend @$(OCAMLDEP) -native $(INCLUDES) $^ > .depend

View File

@ -5,8 +5,8 @@ set -e
DIR=$(dirname "$0") DIR=$(dirname "$0")
cd "${DIR}" cd "${DIR}"
DATA_DIR="$(mktemp -td tezos_node.XXXXXXXXXX)" DATA_DIR="$(mktemp -d -t tezos_node.XXXXXXXXXX)"
CLIENT_DIR="$(mktemp -td tezos_client.XXXXXXXXXX)" CLIENT_DIR="$(mktemp -d -t tezos_client.XXXXXXXXXX)"
cleanup() { cleanup() {
[ -z "${NODE_PID}" ] || kill -9 ${NODE_PID} || true [ -z "${NODE_PID}" ] || kill -9 ${NODE_PID} || true