#!/bin/sh # announce the game to modern desktop environments # (by creating ~/.local/share/applications/assaultcube.desktop) # Hint: this script has to be located in the assaultcube base directory to work # get Exec target path (CUBE_DIR has to be the full path of the assaultcube base directory) CUBE_DIR=$(dirname $(readlink -f "${0}")) CUBE_EXEC=assaultcube.sh SHORTCUTPATH=~/.local/share/applications SHORTCUTFILE=assaultcube_svn.desktop if [ -x "${CUBE_DIR}/${CUBE_EXEC}" ]; then if [ -f ${SHORTCUTPATH}/${SHORTCUTFILE} ]; then rm ${SHORTCUTPATH}/${SHORTCUTFILE} echo "Shortcut removed." else mkdir -pv ${SHORTCUTPATH} cat > ${SHORTCUTPATH}/${SHORTCUTFILE} <