#!/bin/sh
# Runs the system HEIC decoder. Lives inside the app so PHP open_basedir can start it.
for bin in /usr/bin/heif-convert /usr/bin/heif-dec /usr/local/bin/heif-convert /usr/local/bin/heif-dec; do
  if [ -x "$bin" ]; then
    exec "$bin" "$@"
  fi
done
echo "heif-convert not found" >&2
exit 127
