shell: test -a|o is not POSIX (#250)
This commit is contained in:
@@ -200,7 +200,7 @@ configure.sh config.h.in: configure.ac aclocal.m4
|
|||||||
else \
|
else \
|
||||||
echo "config.h.in has CHANGED."; \
|
echo "config.h.in has CHANGED."; \
|
||||||
fi
|
fi
|
||||||
@if test -f configure.sh.old -o -f config.h.in.old; then \
|
@if test -f configure.sh.old || test -f config.h.in.old; then \
|
||||||
if test "$(MAKECMDGOALS)" = reconfigure; then \
|
if test "$(MAKECMDGOALS)" = reconfigure; then \
|
||||||
echo 'Continuing with "make reconfigure".'; \
|
echo 'Continuing with "make reconfigure".'; \
|
||||||
else \
|
else \
|
||||||
|
|||||||
@@ -262,7 +262,7 @@ fi
|
|||||||
|
|
||||||
if test x"$enable_simd" != x"no"; then
|
if test x"$enable_simd" != x"no"; then
|
||||||
# For x86-64 SIMD, g++ >=5 or clang++ >=7 is required
|
# For x86-64 SIMD, g++ >=5 or clang++ >=7 is required
|
||||||
if test x"$host_cpu" = x"x86_64" -o x"$host_cpu" = x"amd64"; then
|
if test x"$host_cpu" = x"x86_64" || test x"$host_cpu" = x"amd64"; then
|
||||||
AC_LANG(C++)
|
AC_LANG(C++)
|
||||||
if test x"$host_cpu" = x"$build_cpu"; then
|
if test x"$host_cpu" = x"$build_cpu"; then
|
||||||
AC_RUN_IFELSE([AC_LANG_PROGRAM([SIMD_X86_64_TEST],[[if (test_ssse3(42) != 42 || test_sse2(42) != 42 || test_avx2(42) != 42) exit(1);]])],
|
AC_RUN_IFELSE([AC_LANG_PROGRAM([SIMD_X86_64_TEST],[[if (test_ssse3(42) != 42 || test_sse2(42) != 42 || test_avx2(42) != 42) exit(1);]])],
|
||||||
@@ -326,7 +326,7 @@ if test x"$enable_asm" = x""; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if test x"$enable_asm" != x"no"; then
|
if test x"$enable_asm" != x"no"; then
|
||||||
if test x"$host_cpu" = x"x86_64" -o x"$host_cpu" = x"amd64"; then
|
if test x"$host_cpu" = x"x86_64" || test x"$host_cpu" = x"amd64"; then
|
||||||
ASM="$host_cpu"
|
ASM="$host_cpu"
|
||||||
elif test x"$enable_asm" = x"yes"; then
|
elif test x"$enable_asm" = x"yes"; then
|
||||||
AC_MSG_RESULT(unavailable)
|
AC_MSG_RESULT(unavailable)
|
||||||
@@ -712,7 +712,7 @@ yes
|
|||||||
#endif],
|
#endif],
|
||||||
rsync_cv_HAVE_GETADDR_DEFINES=yes,
|
rsync_cv_HAVE_GETADDR_DEFINES=yes,
|
||||||
rsync_cv_HAVE_GETADDR_DEFINES=no)])
|
rsync_cv_HAVE_GETADDR_DEFINES=no)])
|
||||||
AS_IF([test x"$rsync_cv_HAVE_GETADDR_DEFINES" = x"yes" -a x"$ac_cv_type_struct_addrinfo" = x"yes"],[
|
AS_IF([test x"$rsync_cv_HAVE_GETADDR_DEFINES" = x"yes" && test x"$ac_cv_type_struct_addrinfo" = x"yes"],[
|
||||||
# Tru64 UNIX has getaddrinfo() but has it renamed in libc as
|
# Tru64 UNIX has getaddrinfo() but has it renamed in libc as
|
||||||
# something else so we must include <netdb.h> to get the
|
# something else so we must include <netdb.h> to get the
|
||||||
# redefinition.
|
# redefinition.
|
||||||
@@ -1384,7 +1384,7 @@ else
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test x"$enable_acl_support" = x"no" -o x"$enable_xattr_support" = x"no" -o x"$enable_iconv" = x"no"; then
|
if test x"$enable_acl_support" = x"no" || test x"$enable_xattr_support" = x"no" || test x"$enable_iconv" = x"no"; then
|
||||||
AC_MSG_CHECKING([whether $CC supports -Wno-unused-parameter])
|
AC_MSG_CHECKING([whether $CC supports -Wno-unused-parameter])
|
||||||
OLD_CFLAGS="$CFLAGS"
|
OLD_CFLAGS="$CFLAGS"
|
||||||
CFLAGS="$CFLAGS -Wno-unused-parameter"
|
CFLAGS="$CFLAGS -Wno-unused-parameter"
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ else
|
|||||||
# might cause directories to be created, which would be especially bad
|
# might cause directories to be created, which would be especially bad
|
||||||
# if $src (and thus $dsttmp) contains '*'.
|
# if $src (and thus $dsttmp) contains '*'.
|
||||||
|
|
||||||
if [ -f $src -o -d $src ]
|
if [ -f $src ] || [ -d $src ]
|
||||||
then
|
then
|
||||||
true
|
true
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
# run "make distclean" before creating the auto-build-save dir.
|
# run "make distclean" before creating the auto-build-save dir.
|
||||||
|
|
||||||
auto_top='auto-build-save'
|
auto_top='auto-build-save'
|
||||||
if test -d $auto_top -a -d .git; then
|
if test -d $auto_top && test -d .git; then
|
||||||
desired_branch=`git rev-parse --abbrev-ref HEAD | tr / %`
|
desired_branch=`git rev-parse --abbrev-ref HEAD | tr / %`
|
||||||
if test "$desired_branch" = HEAD; then
|
if test "$desired_branch" = HEAD; then
|
||||||
echo "ERROR: switch to the right build dir manually when in detached HEAD mode." 1>&2
|
echo "ERROR: switch to the right build dir manually when in detached HEAD mode." 1>&2
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ if test "$dir" != '.'; then
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
for fn in configure.sh config.h.in aclocal.m4; do
|
for fn in configure.sh config.h.in aclocal.m4; do
|
||||||
test ! -f $fn -a -f "$dir/$fn" && cp -p "$dir/$fn" $fn
|
test ! -f $fn && test -f "$dir/$fn" && cp -p "$dir/$fn" $fn
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ if test x"$TOOLDIR" = x; then
|
|||||||
TOOLDIR=`pwd`
|
TOOLDIR=`pwd`
|
||||||
fi
|
fi
|
||||||
srcdir=`dirname $0`
|
srcdir=`dirname $0`
|
||||||
if test x"$srcdir" = x -o x"$srcdir" = x.; then
|
if test x"$srcdir" = x || test x"$srcdir" = x.; then
|
||||||
srcdir="$TOOLDIR"
|
srcdir="$TOOLDIR"
|
||||||
fi
|
fi
|
||||||
if test x"$rsync_bin" = x; then
|
if test x"$rsync_bin" = x; then
|
||||||
@@ -288,7 +288,7 @@ for testscript in $suitedir/$whichtests; do
|
|||||||
result=$?
|
result=$?
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
if [ "x$always_log" = xyes -o \( $result != 0 -a $result != 77 -a $result != 78 \) ]
|
if [ "x$always_log" = xyes ] || ( [ $result != 0 ] && [ $result != 77 ] && [ $result != 78 ] )
|
||||||
then
|
then
|
||||||
echo "----- $testbase log follows"
|
echo "----- $testbase log follows"
|
||||||
cat "$scratchdir/test.log"
|
cat "$scratchdir/test.log"
|
||||||
@@ -336,7 +336,7 @@ echo " $passed passed"
|
|||||||
[ "$failed" -gt 0 ] && echo " $failed failed"
|
[ "$failed" -gt 0 ] && echo " $failed failed"
|
||||||
[ "$skipped" -gt 0 ] && echo " $skipped skipped"
|
[ "$skipped" -gt 0 ] && echo " $skipped skipped"
|
||||||
[ "$missing" -gt 0 ] && echo " $missing missing"
|
[ "$missing" -gt 0 ] && echo " $missing missing"
|
||||||
if [ "$full_run" = yes -a "$expect_skipped" != IGNORE ]; then
|
if [ "$full_run" = yes ] && [ "$expect_skipped" != IGNORE ]; then
|
||||||
skipped_list=`echo "$skipped_list" | sed 's/^,//'`
|
skipped_list=`echo "$skipped_list" | sed 's/^,//'`
|
||||||
echo "----- skipped results:"
|
echo "----- skipped results:"
|
||||||
echo " expected: $expect_skipped"
|
echo " expected: $expect_skipped"
|
||||||
@@ -353,7 +353,7 @@ echo '------------------------------------------------------------'
|
|||||||
# because -e is set.
|
# because -e is set.
|
||||||
|
|
||||||
result=`expr $failed + $missing || true`
|
result=`expr $failed + $missing || true`
|
||||||
if [ "$result" = 0 -a "$skipped_list" != "$expect_skipped" ]; then
|
if [ "$result" = 0 ] && [ "$skipped_list" != "$expect_skipped" ]; then
|
||||||
result=1
|
result=1
|
||||||
fi
|
fi
|
||||||
echo "overall result is $result"
|
echo "overall result is $result"
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ sdev=`$TOOLDIR/getfsdev $scratchdir`
|
|||||||
tdev=$sdev
|
tdev=$sdev
|
||||||
|
|
||||||
for tmpdir2 in "${RSYNC_TEST_TMP:-/override-tmp-not-specified}" /run/shm /var/tmp /tmp; do
|
for tmpdir2 in "${RSYNC_TEST_TMP:-/override-tmp-not-specified}" /run/shm /var/tmp /tmp; do
|
||||||
[ -d "$tmpdir2" -a -w "$tmpdir2" ] || continue
|
[ -d "$tmpdir2" ] && [ -w "$tmpdir2" ] || continue
|
||||||
tdev=`$TOOLDIR/getfsdev "$tmpdir2"`
|
tdev=`$TOOLDIR/getfsdev "$tmpdir2"`
|
||||||
[ x$sdev != x$tdev ] && break
|
[ x$sdev != x$tdev ] && break
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ set_cp_destdir() {
|
|||||||
# even if the copy rounded microsecond times on the destination file.
|
# even if the copy rounded microsecond times on the destination file.
|
||||||
cp_touch() {
|
cp_touch() {
|
||||||
cp_p "${@}"
|
cp_p "${@}"
|
||||||
if test $# -gt 2 -o -d "$2"; then
|
if test $# -gt 2 || test -d "$2"; then
|
||||||
set_cp_destdir "${@}" # sets destdir var
|
set_cp_destdir "${@}" # sets destdir var
|
||||||
while test $# -gt 1; do
|
while test $# -gt 1; do
|
||||||
destname="$destdir/`basename $1`"
|
destname="$destdir/`basename $1`"
|
||||||
|
|||||||
Reference in New Issue
Block a user