LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File qtVlm_wrapper of Package qtVlm (Project home:DocB)

#!/bin/bash

# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.0 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
# Lesser General Public License for more details.
#
# Copyright (C) 2014 Dr. Axel Braun <axel.braun@gmx.de>

# Change to users directory
cd ~/

QTVLM_BIN=/usr/share/qtVlm/qtVlm
QTVLM_HOMEDIR=~/qtVlm

test -x $QTVLM_BIN || { echo "$QTVLM_BIN not installed"; 
	if [ "$1" = "stop" ]; then exit 0;
	else exit 5; fi; }

test -d $QTVLM_HOMEDIR || { echo "Creating $QTVLM_HOMEDIR";
        if [ "$1" = "stop" ]; then exit 0;
	else mkdir -p $QTVLM_HOMEDIR/img/boats \
	$QTVLM_HOMEDIR/grib $QTVLM_HOMEDIR/maps \
	$QTVLM_HOMEDIR/test \
	$QTVLM_HOMEDIR/tracks; \
	cp /usr/share/qtVlm/dataColors.dat $QTVLM_HOMEDIR; fi }

exec $QTVLM_BIN "$@"