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

View file

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