bash : fix wrong tabs.
This commit is contained in:
parent
74a9a94e43
commit
70c54331b6
|
@ -79,8 +79,8 @@ function checksum_check() {
|
||||||
[[ -f "${hashfile}" ]] || { ((skipped++)); continue; }
|
[[ -f "${hashfile}" ]] || { ((skipped++)); continue; }
|
||||||
|
|
||||||
# Calculate hash.
|
# Calculate hash.
|
||||||
local stored=$(cat "${hashfile}" | cut -d\ -f1)
|
local stored=$(cat "${hashfile}" | cut -d\ -f1)
|
||||||
local actual=$(pv "${target}" | sha1sum | cut -d\ -f1)
|
local actual=$(pv "${target}" | sha1sum | cut -d\ -f1)
|
||||||
|
|
||||||
if [[ "${stored}" != "${actual}" ]]; then
|
if [[ "${stored}" != "${actual}" ]]; then
|
||||||
echo -e "${color_bred}${status}: Failed.${color_default}"
|
echo -e "${color_bred}${status}: Failed.${color_default}"
|
||||||
|
|
|
@ -93,7 +93,7 @@ function name_hash() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# hash the new name.
|
# hash the new name.
|
||||||
local hash=$(pv "${target}" | sha1sum | cut -d\ -f1)
|
local hash=$(pv "${target}" | sha1sum | cut -d\ -f1)
|
||||||
new_name="${hash,,}${extension,,}"
|
new_name="${hash,,}${extension,,}"
|
||||||
|
|
||||||
# prepare status.
|
# prepare status.
|
||||||
|
@ -152,7 +152,7 @@ function name_hash_check() {
|
||||||
|
|
||||||
# extract hashes.
|
# extract hashes.
|
||||||
local stored="${target%%.*}"
|
local stored="${target%%.*}"
|
||||||
local actual=$(pv "${target}" | sha1sum | cut -d\ -f1)
|
local actual=$(pv "${target}" | sha1sum | cut -d\ -f1)
|
||||||
|
|
||||||
# compare hashes.
|
# compare hashes.
|
||||||
if [[ "${stored}" != "${actual}" ]]; then
|
if [[ "${stored}" != "${actual}" ]]; then
|
||||||
|
|
Reference in a new issue