diff --git a/.linux/bash/module/archive.sh b/.linux/bash/module/archive.sh index efe9d63..42c4384 100644 --- a/.linux/bash/module/archive.sh +++ b/.linux/bash/module/archive.sh @@ -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_green}${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_green}${status}: Done.${color_default}" done } @@ -109,9 +109,9 @@ archive_check() # compare hashes, show error on mismatch. if [[ "${actual}" = "${saved}" ]]; then - echo "${status}: validation OK." + echo -e "${color_green}${status}: Validation OK.${color_default}" else - echo -e "${color_bred}${status}: validation failed.${color_default}" + echo -e "${color_bred}${status}: Validation failed.${color_default}" ((failed++)) fi done @@ -157,7 +157,7 @@ unarchive() # extract if hash matched or show error if not. if [[ "${saved}" = "${actual}" ]]; then - echo "${status}: validation OK." + echo "${status}: Validation OK." # figure out the compression tool. local compressor @@ -174,12 +174,12 @@ unarchive() pv "${target}" | ${compressor} | tar -xf - else # report validation error & exit. - echo -e "${color_bred}${status}: validation failed.${color_default}" + echo -e "${color_bred}${status}: Validation failed.${color_default}" return 1 fi # report extraction complete. - echo -e "${color_green}${status}: done.${color_default}" + echo -e "${color_green}${status}: Done.${color_default}" done } @@ -221,13 +221,13 @@ archive_name() # check for the same name. if [[ "${target}" = "${new_name}" ]]; then - echo -e "${color_green}${status}: no change.${color_default}" + echo -e "${color_yellow}${status}: No change.${color_default}" continue fi # check for existing target. if [[ -f "${new_name}" ]]; then - echo -e "${color_bred}${status}: already exists.${color_default}" + echo -e "${color_bred}${status}: Already exists.${color_default}" return 1 fi