/usr/bin/gm-convert_file is in gnumed-client 1.6.11+dfsg-3.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | #!/bin/sh
# ===========================================================
# Convert files from one format into another.
#
# The GNUmed client expects to be able to run this command
# in a systemwide way, ie. it needs to be accessible in the
# executable $PATH (such that "which gm-convert_file" gives a
# useful answer). There can be several copies per system in
# which way users can override a system default script with
# their own.
#
# Typical locations for this script would be
#
# /usr/bin/
# /usr/local/bin/
# ~/bin/
#
# This is just an example. You must install ImageMagick
# to actually use it.
#
# ===========================================================
INPUT_FILE="$1"
TARGET_MIME="$2"
TARGET_EXTENSION="$3"
TARGET_FILENAME="$4"
# ----------------------------------------------------------
CONVERTER="convert -regard-warnings " # requires imagemagick
CMD_LINE="${INPUT_FILE} ${TARGET_EXTENSION}:${TARGET_FILENAME}"
RUN_CONVERTER="${CONVERTER} ${CMD_LINE}"
if test -z ${TARGET_FILENAME} ; then
echo "=============================================================================================="
echo "Usage:"
echo " $0 <input file> <target mime type> <target file extension> <target filename>"
echo ""
echo "Given:"
echo " $0 ${CMD_LINE}"
echo "=============================================================================================="
exit 1
fi
rm -f ${TARGET_FILENAME}
rm -f ${TARGET_EXTENSION}:${TARGET_FILENAME}
${RUN_CONVERTER}
if test "$?" != "0" ; then
rm -f ${TARGET_FILENAME}
rm -f ${TARGET_EXTENSION}:${TARGET_FILENAME}
exit 1
fi
exit 0
# ===========================================================
|