name & name_hash : lowercase extension.
This commit is contained in:
parent
6a28236e75
commit
d9e552a07b
|
@ -31,7 +31,7 @@ name()
|
||||||
[[ "${ext#.}" = "${name}" ]] && ext=""
|
[[ "${ext#.}" = "${name}" ]] && ext=""
|
||||||
|
|
||||||
# Get new name.
|
# Get new name.
|
||||||
local new_name=$(parse_simplify "${name}")${ext}
|
local new_name=$(parse_simplify "${name}")${ext,,}
|
||||||
|
|
||||||
# status line.
|
# status line.
|
||||||
local status="[${count}/${total}] ${target} -> ${new_name}"
|
local status="[${count}/${total}] ${target} -> ${new_name}"
|
||||||
|
@ -87,7 +87,7 @@ name_hash()
|
||||||
|
|
||||||
# hash the new name.
|
# hash the new name.
|
||||||
local hash=$(sha1sum -- "${target}" | cut -d\ -f1)
|
local hash=$(sha1sum -- "${target}" | cut -d\ -f1)
|
||||||
new_name="${hash,,}${extension}"
|
new_name="${hash,,}${extension,,}"
|
||||||
|
|
||||||
# prepare status.
|
# prepare status.
|
||||||
local status="[${count}/${total}] ${target} -> ${new_name}"
|
local status="[${count}/${total}] ${target} -> ${new_name}"
|
||||||
|
|
Reference in a new issue