tests: add lint for non portable cp -a
cp -a, while a common flag isn't in POSIX and will therefore fail on systems that don't have GNUish tools (like OpenBSD, AIX or Solaris) Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
8a0ba68f6d
commit
82cbc8cde2
@ -35,6 +35,7 @@ while (<>) {
|
|||||||
chomp;
|
chomp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/\bcp\s+-a/ and err 'cp -a is not portable';
|
||||||
/\bsed\s+-i/ and err 'sed -i is not portable';
|
/\bsed\s+-i/ and err 'sed -i is not portable';
|
||||||
/\becho\s+-[neE]/ and err 'echo with option is not portable (use printf)';
|
/\becho\s+-[neE]/ and err 'echo with option is not portable (use printf)';
|
||||||
/^\s*declare\s+/ and err 'arrays/declare not portable';
|
/^\s*declare\s+/ and err 'arrays/declare not portable';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user