aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Fenoll <[email protected]>2017-12-14 13:58:35 +0100
committerPierre Fenoll <[email protected]>2018-03-14 11:37:24 +0100
commit07d26dc991a6d7cbdd5baaa5b4e2043432ccf9d6 (patch)
tree626fbdf21dfe69e0fa67f2a90c04ea57839f20d9
parentb70d9a7efda9775255a68185044d0e9f8df6027f (diff)
downloadkerl-07d26dc991a6d7cbdd5baaa5b4e2043432ccf9d6.tar.gz
kerl-07d26dc991a6d7cbdd5baaa5b4e2043432ccf9d6.tar.bz2
kerl-07d26dc991a6d7cbdd5baaa5b4e2043432ccf9d6.zip
In kerl line 303:
if [ "$name" = "$1" -o "$path" = "$1" ]; then ^-- SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. In kerl line 339: if [ -n "$has_dpkg" -o -n "$has_rpm" ]; then ^-- SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. In kerl line 341: if [ -n "$has_dpkg" -a -n "$has_rpm" ]; then ^-- SC2166: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. -- In kerl line 577: elif [ "$1" -ge 17 -a "$1" -le 19 ]; then ^-- SC2166: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. -- In kerl line 671: if [ -n "$whichbrew" -a -x "$whichbrew" ]; then ^-- SC2166: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. In kerl line 673: if [ -n "$brew_prefix" -a -d "$brew_prefix" ]; then ^-- SC2166: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. In kerl line 676: elif [ ! -d /usr/include/openssl -o ! -d /usr/local/include/openssl ]; then ^-- SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. -- In kerl line 1270: if [ $status -eq 0 -o $status -eq 2 ]; then ^-- SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
-rwxr-xr-xkerl16
1 files changed, 8 insertions, 8 deletions
diff --git a/kerl b/kerl
index a2d6de1..063ba70 100755
--- a/kerl
+++ b/kerl
@@ -297,7 +297,7 @@ is_valid_installation()
while read -r l; do
name=$(echo "$l" | cut -d " " -f 1)
path=$(echo "$l" | cut -d " " -f 2)
- if [ "$name" = "$1" -o "$path" = "$1" ]; then
+ if [ "$name" = "$1" ] || [ "$path" = "$1" ]; then
if [ -f "$path"/activate ]; then
return 0
fi
@@ -333,9 +333,9 @@ _check_required_pkgs()
{
has_dpkg=$(which dpkg)
has_rpm=$(which rpm)
- if [ -n "$has_dpkg" -o -n "$has_rpm" ]; then
+ if [ -n "$has_dpkg" ] || [ -n "$has_rpm" ]; then
# found either dpkg or rpm (or maybe even both!)
- if [ -n "$has_dpkg" -a -n "$has_rpm" ]; then
+ if [ -n "$has_dpkg" ] && [ -n "$has_rpm" ]; then
echo "WARNING: You appear to have BOTH rpm and dpkg. This is very strange. No package checks done."
elif [ -n "$has_dpkg" ]; then
_check_dpkg
@@ -576,7 +576,7 @@ maybe_patch_darwin()
elif [ "$1" -eq 16 ]; then
# TODO: Maybe check if clang version == 9
apply_r16_wx_ptr_patch >> "$LOGFILE"
- elif [ "$1" -ge 17 -a "$1" -le 19 ]; then
+ elif [ "$1" -ge 17 ] && [ "$1" -le 19 ]; then
apply_wx_ptr_patch >> "$LOGFILE"
fi
}
@@ -670,12 +670,12 @@ _do_build()
# Reminder to self: 0 from grep means the string was detected
if [ $? -ne 0 ]; then
whichbrew=$(which brew)
- if [ -n "$whichbrew" -a -x "$whichbrew" ]; then
+ if [ -n "$whichbrew" ] && [ -x "$whichbrew" ]; then
brew_prefix=$(brew --prefix openssl)
- if [ -n "$brew_prefix" -a -d "$brew_prefix" ]; then
+ if [ -n "$brew_prefix" ] && [ -d "$brew_prefix" ]; then
KERL_CONFIGURE_OPTIONS="$KERL_CONFIGURE_OPTIONS --with-ssl=$brew_prefix"
fi
- elif [ ! -d /usr/include/openssl -o ! -d /usr/local/include/openssl ]; then
+ elif [ ! -d /usr/include/openssl ] || [ ! -d /usr/local/include/openssl ]; then
# Apple removed OpenSSL from El Capitan, but its still in this
# funky location, so set ssl headers to look here
xc_ssl='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-migrator/sdk/MacOSX.sdk/usr'
@@ -1269,7 +1269,7 @@ build_plt()
apps=`for app in $dirs; do basename $app | cut -d- -f1 ; done | grep -Ev 'erl_interface|jinterface' | xargs echo`
$dialyzer --output_plt $plt --build_plt --apps $apps >> $build_log 2>&1
status=$?
- if [ $status -eq 0 -o $status -eq 2 ]; then
+ if [ $status -eq 0 ] || [ $status -eq 2 ]; then
echo "Done building $plt"
return 0
else