History

Use if COND (instead of ! COND || EXPR) where it makes sense

malc committed 5 years ago

Commit 4bce8ea1 parent 3e690891 file · +10 −10Browse files

Unified · Split

build.bash+10−10
@@ -95,7 +95,7 @@ mflags() { · 94 unmodified lines
9595 }
9696
9797 overs="$(ocamlc -vnum 2>/dev/null)" || overs=""
98−test "$overs" = "4.12.0" || {
98+if test "$overs" != "4.12.0"; then
9999 url=https://caml.inria.fr/pub/distrib/ocaml-4.12/ocaml-4.12.0.tar.xz
100100 txz=$outd/$(basename $url)
101101 keycmd="printf $url; digest $txz;"
@@ -127,7 +127,7 @@ test "$overs" = "4.12.0" || { · 25 unmodified lines
127127 eval $keycmd >$absprefix/bin/ocamlc.past
128128 ) && vecho "fresh ocamlc"
129129 overs=$(ocamlc -vnum 2>/dev/null)
130−}
130+fi
131131
132132 while read k v; do
133133 case "$k" in
@@ -139,10 +139,10 @@ done < <(ocamlc -config) · 5 unmodified lines
139139 cvers=$($ccomp --version | { read v; echo $v; })
140140
141141 bocaml1() {
142− grep -q "$3" $outd/ordered || {
142+ if ! grep -q "$3" $outd/ordered; then
143143 bocaml2 "$@"
144144 echo "$3" >>"$outd/ordered"
145− }
145+ fi
146146 }
147147
148148 bocaml2() {
@@ -156,10 +156,10 @@ bocaml2() { · 7 unmodified lines
156156 local O=${o#$outd/}
157157 for d in $depl; do
158158 local D=${d##$srcd/}
159− test "${O%%.cmo}" = "${D%%.cmi}" || {
159+ if test "${O%%.cmo}" != "${D%%.cmi}"; then
160160 test "$d" = "$outd/confstruct.cmo" || d=$outd/${d#$srcd/}
161161 deps+="$d\n"
162− }
162+ fi
163163 done
164164 printf "$deps"
165165 } >$o.depl || die "escaped $?"
@@ -189,10 +189,10 @@ bocaml() { · 23 unmodified lines
189189 s=$outd/confstruct.ml
190190 o=$outd/confstruct.cmo;;
191191 *)
192− test "$o" = "$wocmi" && s=$srcd/${o%.cmo}.ml || {
193− cmi=true
194− s=$srcd/$wocmi.mli
195− }
192+ if test "$o" = "$wocmi"; then s=$srcd/${o%.cmo}.ml; else
193+ cmi=true
194+ s=$srcd/$wocmi.mli
195+ fi
196196 o=$outd/$o;;
197197 esac
198198 expr >/dev/null "$cycle" : ".*$o" && die cycle $o || cycle="$cycle$o"

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t