#!/bin/bash
# This file is part of the PyOWS-WMS-Server package (= program).
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
#
# author(s): Sebastian Holler
#
# Copyright (c)2008 by Sebastian Holler
# for document references, used in this source code: see
# use: returns some information about the Linux system
# run this script in shell environment!!
# output: kernel-version##architecture##distribution##imagemagick-version
# kernel information:
uname -r 2>/dev/null || echo -n "unknown"
echo -n "##"
# architecture information:
uname -m 2>/dev/null || echo -n "unknown"
echo -n "##"
# distribution information (on LSB compliant distributions):
lsb_release -ds 2>/dev/null || echo -n "unknown"
echo -n "##"
# imageMagick version string:
IMAGICKV=$(convert -version 2>/dev/null)
if [ "$IMAGICKV" == "" ]; then
echo -n "not installed"
elif [ "$(echo $IMAGICKV | grep ImageMagick)" == "" ]; then
echo -n "unknown"
else
# (full version string: "Version: ImageMagick X.x.x mm/dd/yy Q16 ht..."
# "cut ... | head ..." -> extracting just the version number)
echo $IMAGICKV | cut -f 3 -d " " | head -n 1
fi