bash : use bold white color for statuses.
This commit is contained in:
parent
69aaccc10c
commit
944e651b7d
|
@ -24,7 +24,7 @@ function archive() {
|
||||||
|
|
||||||
# status info.
|
# status info.
|
||||||
local status="[${count}/${total}] ${target}"
|
local status="[${count}/${total}] ${target}"
|
||||||
echo -e "${status}"
|
echo -e "${color_bwhite}${status}${color_default}"
|
||||||
|
|
||||||
local name=$(parse_camel "${target}")
|
local name=$(parse_camel "${target}")
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ function archive_fast() {
|
||||||
|
|
||||||
# status info.
|
# status info.
|
||||||
local status="[${count}/${total}] ${target}"
|
local status="[${count}/${total}] ${target}"
|
||||||
echo -e "${status}"
|
echo -e "${color_bwhite}${status}${color_default}"
|
||||||
|
|
||||||
local name=$(parse_camel "${target}")
|
local name=$(parse_camel "${target}")
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@ function archive_check() {
|
||||||
|
|
||||||
# status info.
|
# status info.
|
||||||
local status="[${count}/${total}] ${target}"
|
local status="[${count}/${total}] ${target}"
|
||||||
echo -e "${status}"
|
echo -e "${color_bwhite}${status}${color_default}"
|
||||||
|
|
||||||
# extract hash from name.
|
# extract hash from name.
|
||||||
local data=($(_archive_parse ${target}))
|
local data=($(_archive_parse ${target}))
|
||||||
|
@ -215,7 +215,7 @@ function unarchive() {
|
||||||
|
|
||||||
# status info.
|
# status info.
|
||||||
local status="[${count}/${total}] ${target}"
|
local status="[${count}/${total}] ${target}"
|
||||||
echo -e "${status}"
|
echo -e "${color_bwhite}${status}${color_default}"
|
||||||
|
|
||||||
# extract hash from name.
|
# extract hash from name.
|
||||||
local data=($(_archive_parse "${target}"))
|
local data=($(_archive_parse "${target}"))
|
||||||
|
@ -297,7 +297,7 @@ function archive_name() {
|
||||||
|
|
||||||
# check for the same name.
|
# check for the same name.
|
||||||
if [[ "${target}" = "${new_name}" ]]; then
|
if [[ "${target}" = "${new_name}" ]]; then
|
||||||
echo -e "${status}"
|
echo -e "${color_bwhite}${status}${color_default}"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -308,7 +308,7 @@ function archive_name() {
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e "${status}"
|
echo -e "${color_bwhite}${status}${color_default}"
|
||||||
|
|
||||||
# rename.
|
# rename.
|
||||||
mv -- "${target}" "${new_name}"
|
mv -- "${target}" "${new_name}"
|
||||||
|
@ -390,7 +390,7 @@ function archive_rm() {
|
||||||
|
|
||||||
# status info.
|
# status info.
|
||||||
local status="[${count}/${total}] ${target}"
|
local status="[${count}/${total}] ${target}"
|
||||||
echo -e "${status}"
|
echo -e "${color_bwhite}${status}${color_default}"
|
||||||
|
|
||||||
# Delete archive.
|
# Delete archive.
|
||||||
rm -- "${target}"
|
rm -- "${target}"
|
||||||
|
|
|
@ -24,7 +24,7 @@ function checksum_create() {
|
||||||
|
|
||||||
# Status info.
|
# Status info.
|
||||||
local status="[${count}/${total}] ${target}"
|
local status="[${count}/${total}] ${target}"
|
||||||
echo -e "${status}"
|
echo -e "${color_bwhite}${status}${color_default}"
|
||||||
|
|
||||||
# Skip if hash exists.
|
# Skip if hash exists.
|
||||||
[[ -f "${hashfile}" ]] && continue
|
[[ -f "${hashfile}" ]] && continue
|
||||||
|
@ -71,7 +71,7 @@ function checksum_check() {
|
||||||
|
|
||||||
# Status info.
|
# Status info.
|
||||||
local status="[${count}/${total}] ${target}"
|
local status="[${count}/${total}] ${target}"
|
||||||
echo -e "${status}"
|
echo -e "${color_bwhite}${status}${color_default}"
|
||||||
|
|
||||||
# Skip if hash doesn't exist.
|
# Skip if hash doesn't exist.
|
||||||
[[ -f "${hashfile}" ]] || { ((skipped++)); continue; }
|
[[ -f "${hashfile}" ]] || { ((skipped++)); continue; }
|
||||||
|
|
|
@ -37,7 +37,7 @@ function name() {
|
||||||
|
|
||||||
# status line.
|
# status line.
|
||||||
local status="[${count}/${total}] ${target} -> ${new_name}"
|
local status="[${count}/${total}] ${target} -> ${new_name}"
|
||||||
echo -e "${status}"
|
echo -e "${color_bwhite}${status}${color_default}"
|
||||||
|
|
||||||
# check if same name.
|
# check if same name.
|
||||||
[[ "${target}" = "${new_name}" ]] && continue
|
[[ "${target}" = "${new_name}" ]] && continue
|
||||||
|
@ -102,12 +102,12 @@ function name_hash() {
|
||||||
# check if same name.
|
# check if same name.
|
||||||
if [[ "${target}" = "${new_name}" ]]; then
|
if [[ "${target}" = "${new_name}" ]]; then
|
||||||
# echo -e "${color_green}${status}: No change.${color_default}"
|
# echo -e "${color_green}${status}: No change.${color_default}"
|
||||||
echo -e "${status}"
|
echo -e "${color_bwhite}${status}${color_default}"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# show change.
|
# show change.
|
||||||
echo -e "${status}"
|
echo -e "${color_bwhite}${status}${color_default}"
|
||||||
|
|
||||||
# rename target.
|
# rename target.
|
||||||
mv -- "${target}" "${new_name}"
|
mv -- "${target}" "${new_name}"
|
||||||
|
@ -148,7 +148,7 @@ function name_hash_check() {
|
||||||
# status info.
|
# status info.
|
||||||
local status="[${count}/${total}] ${target}"
|
local status="[${count}/${total}] ${target}"
|
||||||
|
|
||||||
echo -e "${status}"
|
echo -e "${color_bwhite}${status}${color_default}"
|
||||||
|
|
||||||
# extract hashes.
|
# extract hashes.
|
||||||
local stored="${target%%.*}"
|
local stored="${target%%.*}"
|
||||||
|
@ -202,7 +202,7 @@ function name_series() {
|
||||||
|
|
||||||
# prepare status.
|
# prepare status.
|
||||||
local status="[${count}/${total}] ${target} -> ${new_name}"
|
local status="[${count}/${total}] ${target} -> ${new_name}"
|
||||||
echo -e "${status}"
|
echo -e "${color_bwhite}${status}${color_default}"
|
||||||
|
|
||||||
# Warning on no change.
|
# Warning on no change.
|
||||||
[[ "${target}" = "${new_name}" ]] && continue
|
[[ "${target}" = "${new_name}" ]] && continue
|
||||||
|
@ -311,7 +311,7 @@ function name_ext() {
|
||||||
|
|
||||||
# Prepare status.
|
# Prepare status.
|
||||||
local status="[${count}/${total}] ${target} -> ${new_name}"
|
local status="[${count}/${total}] ${target} -> ${new_name}"
|
||||||
echo -e "${status}"
|
echo -e "${color_bwhite}${status}${color_default}"
|
||||||
|
|
||||||
# Warning on no change.
|
# Warning on no change.
|
||||||
[[ "${target}" = "${new_name}" ]] && continue
|
[[ "${target}" = "${new_name}" ]] && continue
|
||||||
|
@ -359,7 +359,7 @@ function name_prefix() {
|
||||||
|
|
||||||
# Prepare status.
|
# Prepare status.
|
||||||
local status="[${count}/${total}] ${target} -> ${new_name}"
|
local status="[${count}/${total}] ${target} -> ${new_name}"
|
||||||
echo -e "${status}"
|
echo -e "${color_bwhite}${status}${color_default}"
|
||||||
|
|
||||||
# Warning on no change.
|
# Warning on no change.
|
||||||
[[ "${target}" = "${new_name}" ]] && continue
|
[[ "${target}" = "${new_name}" ]] && continue
|
||||||
|
@ -407,7 +407,7 @@ function name_postfix() {
|
||||||
|
|
||||||
# Prepare status.
|
# Prepare status.
|
||||||
local status="[${count}/${total}] ${target} -> ${new_name}"
|
local status="[${count}/${total}] ${target} -> ${new_name}"
|
||||||
echo -e "${status}"
|
echo -e "${color_bwhite}${status}${color_default}"
|
||||||
|
|
||||||
# Warning on no change.
|
# Warning on no change.
|
||||||
[[ "${target}" = "${new_name}" ]] && continue
|
[[ "${target}" = "${new_name}" ]] && continue
|
||||||
|
@ -455,7 +455,7 @@ function name_replace() {
|
||||||
|
|
||||||
# Prepare status.
|
# Prepare status.
|
||||||
local status="[${count}/${total}] ${target} -> ${new_name}"
|
local status="[${count}/${total}] ${target} -> ${new_name}"
|
||||||
echo -e "${status}"
|
echo -e "${color_bwhite}${status}${color_default}"
|
||||||
|
|
||||||
# Warning on no change.
|
# Warning on no change.
|
||||||
[[ "${target}" = "${new_name}" ]] && continue
|
[[ "${target}" = "${new_name}" ]] && continue
|
||||||
|
@ -518,7 +518,7 @@ function name_fix_numbering() {
|
||||||
|
|
||||||
# Check that starts with a digit.
|
# Check that starts with a digit.
|
||||||
if [[ ! "${target}" =~ ^[0-9] ]]; then
|
if [[ ! "${target}" =~ ^[0-9] ]]; then
|
||||||
echo "${status}"
|
echo -e "${color_bwhite}${status}${color_default}"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -532,7 +532,7 @@ function name_fix_numbering() {
|
||||||
|
|
||||||
# Skip if the same.
|
# Skip if the same.
|
||||||
if [[ "${target}" = "${new_name}" ]]; then
|
if [[ "${target}" = "${new_name}" ]]; then
|
||||||
echo "${status}"
|
echo -e "${color_bwhite}${status}${color_default}"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -542,7 +542,7 @@ function name_fix_numbering() {
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "${status}"
|
echo -e "${color_bwhite}${status}${color_default}"
|
||||||
|
|
||||||
mv -- "${target}" "${new_name}"
|
mv -- "${target}" "${new_name}"
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ function transcode() {
|
||||||
local status="[${count}/${total}] ${target} -> ${output}"
|
local status="[${count}/${total}] ${target} -> ${output}"
|
||||||
|
|
||||||
# Show status.
|
# Show status.
|
||||||
echo -e "${status}"
|
echo -e "${color_bwhite}${status}${color_default}"
|
||||||
|
|
||||||
# Skip if file exists.
|
# Skip if file exists.
|
||||||
[[ -f "${output}" ]] && { ((skipped++)); continue; }
|
[[ -f "${output}" ]] && { ((skipped++)); continue; }
|
||||||
|
|
Reference in a new issue