scripts: convert: add nix build to ensure path

This commit is contained in:
Mateusz Słodkowicz 2024-09-15 21:40:25 +02:00
parent ed1b629386
commit c5602cebbf
Signed by: materus
GPG Key ID: 28D140BCA60B4FD1
1 changed files with 1 additions and 1 deletions

View File

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