Fixed convertHEIC mogrify detection to work as cron task.
This commit is contained in:
parent
82b7b835ba
commit
e20b742492
@ -12,9 +12,16 @@ keeporiginals=1
|
|||||||
# Set to 0 for PNG (much larger file size)
|
# Set to 0 for PNG (much larger file size)
|
||||||
saveasjpg=1
|
saveasjpg=1
|
||||||
|
|
||||||
# Make sure the mogrify command is available
|
# Make sure the mogrify command is available. If this is being
|
||||||
|
# run as a cron job the which command will fail so we check the
|
||||||
|
# default location just in case.
|
||||||
which mogrify > /dev/null
|
which mogrify > /dev/null
|
||||||
[ $? -eq 1 ] && echo "Unable to run the mogrify command. Please follow the build and installation instructions at the top of the script to install the program on your system." && exit
|
if [[ $? -eq 1 ]]; then
|
||||||
|
if [[ ! -e "/usr/local/bin/mogrify" ]]; then
|
||||||
|
echo "Unable to run the mogrify command. Please follow the build and installation instructions at the top of the script to install the program on your system."
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Change into the folder with our images
|
# Change into the folder with our images
|
||||||
cd "$directory"
|
cd "$directory"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user