blob: 8b519a80dd35d46ee5ea082288534132ba31988a [file] [log] [blame]
Martin Roth0ad5fbd2020-12-24 12:06:38 -07001#!/usr/bin/env sh
Martin Rothe99a7182018-06-06 21:34:47 -06002#
Patrick Georgi7333a112020-05-08 20:48:04 +02003# SPDX-License-Identifier: GPL-2.0-only
4
Martin Rothe99a7182018-06-06 21:34:47 -06005# DESCR: Check for illegal characters in filename
6
7LC_ALL=C export LC_ALL
8
9# Skip check if git isn't available
10if [ -n "$(command -v git)" ] && \
11 [ "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" ]
12then
13 git ls-files | grep "[^A-Za-z0-9/_\.-]"
14fi