Martin Roth | e99a718 | 2018-06-06 21:34:47 -0600 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | # This file is part of the coreboot project. |
| 3 | # |
| 4 | # Copyright (C) 2018 Google LLC |
| 5 | # |
| 6 | # This program is free software; you can redistribute it and/or modify |
| 7 | # it under the terms of the GNU General Public License as published by |
| 8 | # the Free Software Foundation; version 2 of the License. |
| 9 | # |
| 10 | # This program is distributed in the hope that it will be useful, |
| 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | # GNU General Public License for more details. |
| 14 | # |
| 15 | # DESCR: Check for illegal characters in filename |
| 16 | |
| 17 | LC_ALL=C export LC_ALL |
| 18 | |
| 19 | # Skip check if git isn't available |
| 20 | if [ -n "$(command -v git)" ] && \ |
| 21 | [ "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" ] |
| 22 | then |
| 23 | git ls-files | grep "[^A-Za-z0-9/_\.-]" |
| 24 | fi |