bash : revert blue colors.

This commit is contained in:
Dmitry Voronin 2023-11-22 11:07:29 +03:00
parent 5b0a864784
commit 9974dd1c4c
4 changed files with 14 additions and 14 deletions

View file

@ -26,7 +26,7 @@ archive()
# status info. # status info.
local status="[${count}/${total}] ${target}" local status="[${count}/${total}] ${target}"
echo -e "${color_bblue}${status}${color_default}" echo -e "${status}"
# create archive. # create archive.
tar -c "${target}" | pv -s $(du -sb "${target}" | awk '{print $1}') | xz -9e > "${target%/*}".txz tar -c "${target}" | pv -s $(du -sb "${target}" | awk '{print $1}') | xz -9e > "${target%/*}".txz
@ -61,7 +61,7 @@ archive_fast()
# status info. # status info.
local status="[${count}/${total}] ${target}" local status="[${count}/${total}] ${target}"
echo -e "${color_bblue}${status}${color_default}" echo -e "${status}"
# create archive. # create archive.
tar -c "${target}" | pv -s $(du -sb "${target}" | awk '{print $1}') | gzip -1 > "${target%/*}".tgz tar -c "${target}" | pv -s $(du -sb "${target}" | awk '{print $1}') | gzip -1 > "${target%/*}".tgz
@ -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_bblue}${status}: Validation OK.${color_default}" echo -e "${status}: Validation OK."
else else
echo -e "${color_bred}${status}: Validation failed.${color_default}" echo -e "${color_bred}${status}: Validation failed.${color_default}"
((failed++)) ((failed++))
@ -155,7 +155,7 @@ unarchive()
# extract if hash matched or show error if not. # extract if hash matched or show error if not.
if [[ "${saved}" = "${actual}" ]]; then if [[ "${saved}" = "${actual}" ]]; then
echo -e "${color_bblue}${status}: Validation OK.${color_default}" echo -e "${status}: Validation OK."
# figure out the compression tool. # figure out the compression tool.
local compressor local compressor
@ -230,7 +230,7 @@ archive_name()
fi fi
# rename. # rename.
mv -- "${target}" "${new_name}" && echo -e "${color_bblue}${status}${color_default}" || echo -e "${color_bred}${status}: Error.${color_default}" mv -- "${target}" "${new_name}" && echo -e "${status}" || echo -e "${color_bred}${status}: Error.${color_default}"
done done
} }

View file

@ -32,7 +32,7 @@ convert()
local status="[${count}/${total}] ${target} -> ${target%.*}.${to}" local status="[${count}/${total}] ${target} -> ${target%.*}.${to}"
# Show status. # Show status.
echo -e "${color_bblue}${status}${color_default}" echo -e "${status}"
# Support multiple inputs. # Support multiple inputs.
[[ "${to}" = "mp3" ]] && from="" [[ "${to}" = "mp3" ]] && from=""

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_bblue}${status}${color_default}" echo -e "${status}"
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_bblue}${status}${color_default}" echo -e "${status}"
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_bblue}${status}: Validation OK.${color_default}" echo -e "${status}: Validation OK."
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_bblue}${status}${color_default}" echo -e "${status}"
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_bblue}${status}${color_default}" echo -e "${status}"
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_bblue}${status}${color_default}" echo -e "${status}"
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_bblue}${status}${color_default}" echo -e "${status}"
done done
} }

View file

@ -80,7 +80,7 @@ unpack()
local status="[${count}/${total}] ${target}" local status="[${count}/${total}] ${target}"
# show status. # show status.
echo -e "${color_bblue}${status}${color_default}" echo -e "${status}"
# unpack file type. # unpack file type.
local type="${target##*.}" local type="${target##*.}"