mirror of
https://github.com/super-linter/super-linter.git
synced 2024-11-29 01:21:05 -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 #
|
# Get the files extension #
|
||||||
###########################
|
###########################
|
||||||
# Extract just the file and extension, reverse it, cut off extension,
|
# Extract just the file extension
|
||||||
# reverse it back, substitute to lowercase
|
FILE_TYPE=${FILE##*.}
|
||||||
FILE_TYPE=$(basename "${FILE}" | rev | cut -f1 -d'.' | rev | awk '{print tolower($0)}')
|
# To lowercase
|
||||||
|
FILE_TYPE=${FILE_TYPE,,}
|
||||||
|
|
||||||
##############
|
##############
|
||||||
# Print file #
|
# Print file #
|
||||||
|
|
Loading…
Reference in a new issue