From 5f35396395a61a9dd60367066bd4495091bd6f88 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 26 Jul 2011 09:01:44 +0200 Subject: maint: use consistent style in C and test scripts * src/copy.c (copy_internal): Adjust formatting style to conform with guidelines in HACKING: put braces around two one-line "else" blocks. * tests/cp/existing-perm-dir: Use $(...), not `...`, and stat rather than ls+cut to get the mode string. mode=$(stat --p=%A dst/dir) --- tests/cp/existing-perm-dir | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/cp') diff --git a/tests/cp/existing-perm-dir b/tests/cp/existing-perm-dir index 6ef73f0a0..a8c281669 100755 --- a/tests/cp/existing-perm-dir +++ b/tests/cp/existing-perm-dir @@ -25,7 +25,7 @@ mkdir -p -m ug-s,u=rwx,g=,o= dst/dir || fail=1 cp -r src/. dst/ || fail=1 -mode=`ls -ld dst/dir | cut -b-10` +mode=$(stat --p=%A dst/dir) test "$mode" = drwx------ || fail=1 Exit $fail -- cgit v1.2.3-54-g00ecf