Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e9be209

Browse filesBrowse files
concatimedanielleadams
authored andcommitted
build: replace non-POSIX test -a|o
test/[ from sbase unix tools[1] throws "too many arguments" if -a or -o is provided. The syntax has been marked obsolescent as per the manual[2]. [1] http://core.suckless.org/sbase/ [2] https://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html#tag_20_128_16 PR-URL: #38731 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
1 parent 695e982 commit e9be209
Copy full SHA for e9be209

File tree

Expand file treeCollapse file tree

2 files changed

+7
-7
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+7
-7
lines changed
Open diff view settings
Collapse file

‎Makefile‎

Copy file name to clipboardExpand all lines: Makefile
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ $(NODE_EXE): build_type:=Release
103103
$(NODE_G_EXE): build_type:=Debug
104104
$(NODE_EXE) $(NODE_G_EXE): config.gypi out/Makefile
105105
$(MAKE) -C out BUILDTYPE=${build_type} V=$(V)
106-
if [ ! -r $@ -o ! -L $@ ]; then \
106+
if [ ! -r $@ ] || [ ! -L $@ ]; then \
107107
ln -fs out/${build_type}/$(NODE_EXE) $@; fi
108108
else
109109
ifeq ($(BUILD_WITH), ninja)
@@ -117,11 +117,11 @@ else
117117
endif
118118
$(NODE_EXE): config.gypi out/Release/build.ninja
119119
ninja -C out/Release $(NINJA_ARGS)
120-
if [ ! -r $@ -o ! -L $@ ]; then ln -fs out/Release/$(NODE_EXE) $@; fi
120+
if [ ! -r $@ ] || [ ! -L $@ ]; then ln -fs out/Release/$(NODE_EXE) $@; fi
121121

122122
$(NODE_G_EXE): config.gypi out/Debug/build.ninja
123123
ninja -C out/Debug $(NINJA_ARGS)
124-
if [ ! -r $@ -o ! -L $@ ]; then ln -fs out/Debug/$(NODE_EXE) $@; fi
124+
if [ ! -r $@ ] || [ ! -L $@ ]; then ln -fs out/Debug/$(NODE_EXE) $@; fi
125125
else
126126
$(NODE_EXE) $(NODE_G_EXE):
127127
$(warning This Makefile currently only supports building with 'make' or 'ninja')
@@ -908,7 +908,7 @@ BINARYTAR=$(BINARYNAME).tar
908908
HAS_XZ ?= $(shell command -v xz > /dev/null 2>&1; [ $$? -eq 0 ] && echo 1 || echo 0)
909909
# Supply SKIP_XZ=1 to explicitly skip .tar.xz creation
910910
SKIP_XZ ?= 0
911-
XZ = $(shell [ $(HAS_XZ) -eq 1 -a $(SKIP_XZ) -eq 0 ] && echo 1 || echo 0)
911+
XZ = $(shell [ $(HAS_XZ) -eq 1 ] && [ $(SKIP_XZ) -eq 0 ] && echo 1 || echo 0)
912912
XZ_COMPRESSION ?= 9e
913913
PKG=$(TARNAME).pkg
914914
MACOSOUTDIR=out/macos
@@ -949,7 +949,7 @@ release-only: check-xz
949949
echo "" >&2 ; \
950950
exit 1 ; \
951951
fi
952-
@if [ "$(DISTTYPE)" != "release" -o "$(RELEASE)" = "1" ]; then \
952+
@if [ "$(DISTTYPE)" != "release" ] || [ "$(RELEASE)" = "1" ]; then \
953953
exit 0; \
954954
else \
955955
echo "" >&2 ; \
@@ -958,7 +958,7 @@ release-only: check-xz
958958
echo "" >&2 ; \
959959
exit 1 ; \
960960
fi
961-
@if [ "$(RELEASE)" = "0" -o -f "$(CHANGELOG)" ]; then \
961+
@if [ "$(RELEASE)" = "0" ] || [ -f "$(CHANGELOG)" ]; then \
962962
exit 0; \
963963
else \
964964
echo "" >&2 ; \
Collapse file

‎android-configure‎

Copy file name to clipboardExpand all lines: android-configure
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export CXX_host=$(command -v g++)
5656
host_gcc_version=$($CC_host --version | grep gcc | awk '{print $NF}')
5757
major=$(echo $host_gcc_version | awk -F . '{print $1}')
5858
minor=$(echo $host_gcc_version | awk -F . '{print $2}')
59-
if [ -z $major ] || [ -z $minor ] || [ $major -lt 6 ] || [ $major -eq 6 -a $minor -lt 3 ]; then
59+
if [ -z $major ] || [ -z $minor ] || [ $major -lt 6 ] || ( [ $major -eq 6 ] && [ $minor -lt 3 ] ); then
6060
echo "host gcc $host_gcc_version is too old, need gcc 6.3.0"
6161
return 1
6262
fi

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.