1#!/bin/bash 2########################################################################## 3# This script installs lxmed application to your system. It adds 4# a shortcut to your main menu in 5# Preferences -> Main Menu Editor menu 6# or 7# System -> Preferences -> Main Menu Editor 8# depending on your distribution 9# 10# Author: Marko Čičak, cicakmarko@yahoo.com 11########################################################################## 12 13# user must be root 14if [ "$(id -u)" != "0" ]; then 15 echo "Installation must be run as root" 1>&2 16 exit 1 17fi 18 19echo Installing application... 20echo 21 22# remove any existing files and folders 23echo Removing any previous installed files and folders... 24rm -r -v -f /opt/lxmed 25rm -v /usr/share/applications/lxmed.desktop 26rm -v /bin/lxmed # needed for old lxmed version, will be removed in future 27rm -v /usr/bin/lxmed 28 29# copy new files 30mkdir -v /opt/lxmed 31cp -v content/lxmed /usr/bin 32chmod -v +x /usr/bin/lxmed 33cp -v content/LXMenuEditor.jar /opt/lxmed 34cp -v content/uninstall.sh /opt/lxmed 35chmod -v +x /opt/lxmed/uninstall.sh 36cp -v content/lxmed.png /opt/lxmed 37cp -v content/lxmed.desktop /usr/share/applications 38echo 39echo "Installation sucessfully completed. Enter lxmed to run application or check Preferences -> Main Menu Editor in your main menu" 40echo 41