archive & name : update colors.

This commit is contained in:
Dmitry Voronin 2023-11-10 00:18:50 +03:00
parent 9200a614b6
commit f889c9663d
2 changed files with 12 additions and 12 deletions

View file

@ -35,7 +35,7 @@ archive()
mv "${target%/*}".txz "${target%/*}"_${date}-$(pv "${target%/*}".txz | sha1sum | cut -d\ -f1).txz
# report success.
echo -e "${color_green}${status}: Done.${color_default}"
echo -e "${color_default}${status}: Done.${color_default}"
done
}
@ -70,7 +70,7 @@ archive_fast()
mv "${target%/*}".tgz "${target%/*}"_${date}-$(pv "${target%/*}".tgz | sha1sum | cut -d\ -f1).tgz
# report success.
echo -e "${color_green}${status}: Done.${color_default}"
echo -e "${color_default}${status}: Done.${color_default}"
done
}
@ -109,7 +109,7 @@ archive_check()
# compare hashes, show error on mismatch.
if [[ "${actual}" = "${saved}" ]]; then
echo -e "${color_green}${status}: Validation OK.${color_default}"
echo -e "${color_default}${status}: Validation OK.${color_default}"
else
echo -e "${color_bred}${status}: Validation failed.${color_default}"
((failed++))
@ -179,7 +179,7 @@ unarchive()
fi
# report extraction complete.
echo -e "${color_green}${status}: Done.${color_default}"
echo -e "${color_default}${status}: Done.${color_default}"
done
}
@ -232,7 +232,7 @@ archive_name()
fi
# rename.
mv -- "${target}" "${new_name}" && echo -e "${color_green}${status}${color_default}" || echo -e "${color_bred}${status}: Error.${color_default}"
mv -- "${target}" "${new_name}" && echo -e "${color_default}${status}${color_default}" || echo -e "${color_bred}${status}: Error.${color_default}"
done
}

View file

@ -52,7 +52,7 @@ name()
mv -- "${target}" "${new_name}" &> /dev/null
# show change.
echo -e "${color_green}${status}${color_default}"
echo -e "${color_default}${status}${color_default}"
done
}
@ -102,7 +102,7 @@ name_hash()
mv -- "${target}" "${new_name}" &> /dev/null
# show change.
echo -e "${color_green}${status}${color_default}"
echo -e "${color_default}${status}${color_default}"
else
# Increment count.
((count++))
@ -144,7 +144,7 @@ name_hash_check()
# compare hashes.
if [[ "${stored}" = "${actual}" ]]; then
echo -e "${color_green}${status}: Validation OK.${color_default}"
echo -e "${color_default}${status}: Validation OK.${color_default}"
else
echo -e "${color_bred}${status}: Validation failed.${color_default}"
((failed++))
@ -214,7 +214,7 @@ name_series()
mv -- "${target}" "${new_name}" &> /dev/null
# Report status.
echo -e "${color_green}${status}${color_default}"
echo -e "${color_default}${status}${color_default}"
else
# Increment count.
((count++))
@ -272,7 +272,7 @@ name_manga()
mv -- "${target}" "${new_name}" &> /dev/null
# Show status.
echo -e "${color_green}${status}${color_default}"
echo -e "${color_default}${status}${color_default}"
else
# Increment count.
((count++))
@ -327,7 +327,7 @@ name_ext()
mv -- "${target}" "${new_name}" &> /dev/null
# show change.
echo -e "${color_green}${status}${color_default}"
echo -e "${color_default}${status}${color_default}"
else
# Increment count.
((count++))
@ -375,7 +375,7 @@ name_prefix()
mv -- "${target}" "${new_name}" &> /dev/null
# Show change.
echo -e "${color_green}${status}${color_default}"
echo -e "${color_default}${status}${color_default}"
done
}