[gen_cover] Fixed bug with if statement
This commit is contained in:
parent
e7596f0f82
commit
7657e73e24
2 changed files with 2 additions and 3 deletions
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
gen_cover() {
|
gen_cover() {
|
||||||
local COVER="${1}"
|
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}"
|
cat "${COVER}"
|
||||||
[[ ${ERROR} -eq 1 ]] && return 1
|
[[ ${ERROR} -eq 1 ]] && return 1
|
||||||
local IMG_SIZE="$(identify -format "%wx%h" "${COVER}")"
|
local IMG_SIZE="$(identify -format "%wx%h" "${COVER}")"
|
||||||
|
|
|
@ -12,9 +12,8 @@
|
||||||
|
|
||||||
gen_small_cover() {
|
gen_small_cover() {
|
||||||
local COVER="${1}"
|
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=$?
|
local EXIT=$?
|
||||||
cat "$(sed 's|.png|.jpg|' <<<${COVER})"
|
|
||||||
[[ ${EXIT} -ne 0 ]] && return 1
|
[[ ${EXIT} -ne 0 ]] && return 1
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue