mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2025-01-03 05:00:15 +00:00
Prefer = over == for older shell compatibility (#1857)
This commit is contained in:
parent
2892d3b755
commit
6300859c80
@ -108,7 +108,7 @@ function retry {
|
||||
for i in $(seq $N); do
|
||||
echo "Trying: $*"
|
||||
eval $@; rc=$?
|
||||
if [ $rc == 0 ]; then
|
||||
if [ $rc = 0 ]; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
|
@ -262,7 +262,7 @@ function test_chmod {
|
||||
|
||||
# if they're the same, we have a problem.
|
||||
local CHANGED_PERMISSIONS=$(get_permissions $TEST_TEXT_FILE)
|
||||
if [ $CHANGED_PERMISSIONS == $ORIGINAL_PERMISSIONS ]
|
||||
if [ $CHANGED_PERMISSIONS = $ORIGINAL_PERMISSIONS ]
|
||||
then
|
||||
echo "Could not modify $TEST_TEXT_FILE permissions"
|
||||
return 1
|
||||
@ -299,9 +299,9 @@ function test_chown {
|
||||
else
|
||||
local CHANGED_PERMISSIONS=$(stat --format=%u:%g $TEST_TEXT_FILE)
|
||||
fi
|
||||
if [ $CHANGED_PERMISSIONS == $ORIGINAL_PERMISSIONS ]
|
||||
if [ $CHANGED_PERMISSIONS = $ORIGINAL_PERMISSIONS ]
|
||||
then
|
||||
if [ $ORIGINAL_PERMISSIONS == "1000:1000" ]
|
||||
if [ $ORIGINAL_PERMISSIONS = "1000:1000" ]
|
||||
then
|
||||
echo "Could not be strict check because original file permission 1000:1000"
|
||||
else
|
||||
|
@ -115,7 +115,7 @@ function check_file_size() {
|
||||
}
|
||||
|
||||
function mk_test_file {
|
||||
if [ $# == 0 ]; then
|
||||
if [ $# = 0 ]; then
|
||||
local TEXT=$TEST_TEXT
|
||||
else
|
||||
local TEXT=$1
|
||||
@ -144,7 +144,7 @@ function mk_test_file {
|
||||
}
|
||||
|
||||
function rm_test_file {
|
||||
if [ $# == 0 ]; then
|
||||
if [ $# = 0 ]; then
|
||||
local FILE=$TEST_TEXT_FILE
|
||||
else
|
||||
local FILE=$1
|
||||
@ -178,7 +178,7 @@ function rm_test_dir {
|
||||
# Create and cd to a unique directory for this test run
|
||||
# Sets RUN_DIR to the name of the created directory
|
||||
function cd_run_dir {
|
||||
if [ "$TEST_BUCKET_MOUNT_POINT_1" == "" ]; then
|
||||
if [ "$TEST_BUCKET_MOUNT_POINT_1" = "" ]; then
|
||||
echo "TEST_BUCKET_MOUNT_POINT_1 variable not set"
|
||||
exit 1
|
||||
fi
|
||||
@ -240,7 +240,7 @@ function run_suite {
|
||||
TEST_DIR=testdir-$RANDOM
|
||||
$t $key_prefix && rc=$? || rc=$?
|
||||
|
||||
if [[ $rc == 0 ]] ; then
|
||||
if [[ $rc = 0 ]] ; then
|
||||
report_pass $t
|
||||
else
|
||||
report_fail $t
|
||||
|
Loading…
Reference in New Issue
Block a user