t5300-pack-object.sh: portability issue using /usr/bin/stat

In the test 'compare delta flavors', /usr/bin/stat is used to get file size.
This isn't portable.  There already is a dependency on Perl, use its '-s'
operator to get the file size.

Signed-off-by: Arjen Laarhoven <arjen@yaph.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Arjen Laarhoven 2007-04-07 01:49:03 +02:00 коммит произвёл Junio C Hamano
Родитель 4c84f0dcc6
Коммит d93f7c1817
1 изменённых файлов: 6 добавлений и 5 удалений

Просмотреть файл

@ -123,11 +123,12 @@ test_expect_success \
done' done'
cd "$TRASH" cd "$TRASH"
test_expect_success \ test_expect_success 'compare delta flavors' '
'compare delta flavors' \ perl -e '\''
'size_2=`stat -c "%s" test-2-${packname_2}.pack` && defined($_ = -s $_) or die for @ARGV;
size_3=`stat -c "%s" test-3-${packname_3}.pack` && exit 1 if $ARGV[0] <= $ARGV[1];
test $size_2 -gt $size_3' '\'' test-2-$packname_2.pack test-3-$packname_3.pack
'
rm -fr .git2 rm -fr .git2
mkdir .git2 mkdir .git2