scripts: convert: another change of command

This commit is contained in:
Mateusz Słodkowicz 2024-07-12 11:51:46 +02:00
parent afbe226504
commit c8cbb1f2f9
Signed by: materus
GPG Key ID: 28D140BCA60B4FD1
1 changed files with 3 additions and 1 deletions

View File

@ -1,7 +1,9 @@
#/usr/bin/env bash #/usr/bin/env bash
IFS=$'\n' IFS=$'\n'
CONVERT="$(nix eval nixpkgs\#imagemagick.outPath | tr -d '"')/bin/convert"
convert_cmd () { convert_cmd () {
if ! command -v convert &> /dev/null; then nix shell nixpkgs\#imagemagick -c convert "$@"; else convert "$@"; fi if ! command -v convert &> /dev/null; then $CONVERT "$@"; else convert "$@"; fi
} }