mirror of
https://github.com/super-linter/super-linter.git
synced 2024-12-26 06:32:26 -05:00
Simplify extension extraction
This commit is contained in:
parent
6f2c7cace3
commit
fd6dea2c17
1 changed files with 4 additions and 3 deletions
|
@ -84,9 +84,10 @@ function BuildFileList() {
|
|||
###########################
|
||||
# Get the files extension #
|
||||
###########################
|
||||
# Extract just the file and extension, reverse it, cut off extension,
|
||||
# reverse it back, substitute to lowercase
|
||||
FILE_TYPE=$(basename "${FILE}" | rev | cut -f1 -d'.' | rev | awk '{print tolower($0)}')
|
||||
# Extract just the file extension
|
||||
FILE_TYPE=${FILE##*.}
|
||||
# To lowercase
|
||||
FILE_TYPE=${FILE_TYPE,,}
|
||||
|
||||
##############
|
||||
# Print file #
|
||||
|
|
Loading…
Reference in a new issue