Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shell: replace non-POSIX test -a|o #38731

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ $(NODE_EXE): build_type:=Release
$(NODE_G_EXE): build_type:=Debug
$(NODE_EXE) $(NODE_G_EXE): config.gypi out/Makefile
$(MAKE) -C out BUILDTYPE=${build_type} V=$(V)
if [ ! -r $@ -o ! -L $@ ]; then \
if [ ! -r $@ ] || [ ! -L $@ ]; then \
ln -fs out/${build_type}/$(NODE_EXE) $@; fi
else
ifeq ($(BUILD_WITH), ninja)
Expand All @@ -117,11 +117,11 @@ else
endif
$(NODE_EXE): config.gypi out/Release/build.ninja
ninja -C out/Release $(NINJA_ARGS)
if [ ! -r $@ -o ! -L $@ ]; then ln -fs out/Release/$(NODE_EXE) $@; fi
if [ ! -r $@ ] || [ ! -L $@ ]; then ln -fs out/Release/$(NODE_EXE) $@; fi

$(NODE_G_EXE): config.gypi out/Debug/build.ninja
ninja -C out/Debug $(NINJA_ARGS)
if [ ! -r $@ -o ! -L $@ ]; then ln -fs out/Debug/$(NODE_EXE) $@; fi
if [ ! -r $@ ] || [ ! -L $@ ]; then ln -fs out/Debug/$(NODE_EXE) $@; fi
else
$(NODE_EXE) $(NODE_G_EXE):
$(warning This Makefile currently only supports building with 'make' or 'ninja')
Expand Down Expand Up @@ -908,7 +908,7 @@ BINARYTAR=$(BINARYNAME).tar
HAS_XZ ?= $(shell command -v xz > /dev/null 2>&1; [ $$? -eq 0 ] && echo 1 || echo 0)
# Supply SKIP_XZ=1 to explicitly skip .tar.xz creation
SKIP_XZ ?= 0
XZ = $(shell [ $(HAS_XZ) -eq 1 -a $(SKIP_XZ) -eq 0 ] && echo 1 || echo 0)
XZ = $(shell [ $(HAS_XZ) -eq 1 ] && [ $(SKIP_XZ) -eq 0 ] && echo 1 || echo 0)
XZ_COMPRESSION ?= 9e
PKG=$(TARNAME).pkg
MACOSOUTDIR=out/macos
Expand Down Expand Up @@ -949,7 +949,7 @@ release-only: check-xz
echo "" >&2 ; \
exit 1 ; \
fi
@if [ "$(DISTTYPE)" != "release" -o "$(RELEASE)" = "1" ]; then \
@if [ "$(DISTTYPE)" != "release" ] || [ "$(RELEASE)" = "1" ]; then \
exit 0; \
else \
echo "" >&2 ; \
Expand All @@ -958,7 +958,7 @@ release-only: check-xz
echo "" >&2 ; \
exit 1 ; \
fi
@if [ "$(RELEASE)" = "0" -o -f "$(CHANGELOG)" ]; then \
@if [ "$(RELEASE)" = "0" ] || [ -f "$(CHANGELOG)" ]; then \
exit 0; \
else \
echo "" >&2 ; \
Expand Down
2 changes: 1 addition & 1 deletion android-configure
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export CXX_host=$(command -v g++)
host_gcc_version=$($CC_host --version | grep gcc | awk '{print $NF}')
major=$(echo $host_gcc_version | awk -F . '{print $1}')
minor=$(echo $host_gcc_version | awk -F . '{print $2}')
if [ -z $major ] || [ -z $minor ] || [ $major -lt 6 ] || [ $major -eq 6 -a $minor -lt 3 ]; then
if [ -z $major ] || [ -z $minor ] || [ $major -lt 6 ] || ( [ $major -eq 6 ] && [ $minor -lt 3 ] ); then
echo "host gcc $host_gcc_version is too old, need gcc 6.3.0"
return 1
fi
Expand Down