[gen_cover] Fixed bug with if statement

This commit is contained in:
ayakael 2018-07-22 20:12:15 -08:00
parent e7596f0f82
commit 7657e73e24
No known key found for this signature in database
GPG key ID: 575626A4AE5F4026
2 changed files with 2 additions and 3 deletions

View file

@ -12,7 +12,7 @@
gen_cover() {
local COVER="${1}"
[[ -f "${COVER}" ]] || { convert -size 480x480 xc:white "${COVER}"; local ERROR=1; }
[[ ! -f "${COVER}" ]] && { convert -size 480x480 xc:white "${COVER}"; local ERROR=1; }
cat "${COVER}"
[[ ${ERROR} -eq 1 ]] && return 1
local IMG_SIZE="$(identify -format "%wx%h" "${COVER}")"

View file

@ -12,9 +12,8 @@
gen_small_cover() {
local COVER="${1}"
convert "${COVER}" -resize 480x480^ -gravity center -extent 480x480x0x0 "$(sed 's|.png|.jpg|' <<<${COVER})"
convert "${COVER}" -resize 480x480^ -gravity center -extent 480x480x0x0 -
local EXIT=$?
cat "$(sed 's|.png|.jpg|' <<<${COVER})"
[[ ${EXIT} -ne 0 ]] && return 1
return 0
}