diff --git a/data/Jamfile b/data/Jamfile index b33bb98..7303acd 100644 --- a/data/Jamfile +++ b/data/Jamfile @@ -22,3 +22,4 @@ Clean distclean : ede.desktop ; SubInclude TOP data mime-types ; SubInclude TOP data icon-themes ; SubInclude TOP data menu ; +SubInclude TOP data desktop-links ; diff --git a/data/desktop-links/Internet.desktop b/data/desktop-links/Internet.desktop deleted file mode 100644 index 0dd9b35..0000000 --- a/data/desktop-links/Internet.desktop +++ /dev/null @@ -1,10 +0,0 @@ -# EFLTK Configuration - Version 2,003000 - -[Desktop Entry] - Icon=kppp.png - X=20 - Y=210 - Name=Connect to Internet - Exec=epppdialer - Name[sk]=Pripojenie do Internetu - diff --git a/data/desktop-links/Jamfile b/data/desktop-links/Jamfile new file mode 100644 index 0000000..a00fc0b --- /dev/null +++ b/data/desktop-links/Jamfile @@ -0,0 +1,18 @@ +# +# $Id$ +# +# Part of Equinox Desktop Environment (EDE). +# Copyright (c) 2009 EDE Authors. +# +# This program is licensed under terms of the +# GNU General Public License version 2 or newer. +# See COPYING for details. + +SubDir TOP data desktop-links ; + +actions InstallIfEmpty +{ + ./$(SUBDIR)/install-in-desktop-dir.sh +} + +InstallIfEmpty install ; diff --git a/data/desktop-links/Terminal.desktop b/data/desktop-links/Terminal.desktop deleted file mode 100644 index 1aee626..0000000 --- a/data/desktop-links/Terminal.desktop +++ /dev/null @@ -1,10 +0,0 @@ -# EFLTK Configuration - Version 2,003000 - -[Desktop Entry] - Icon=konsole.png - X=20 - Y=130 - Name=Terminal - Exec=xterm - Name[sk]=Terminál - diff --git a/data/desktop-links/ede-xterm.desktop b/data/desktop-links/ede-xterm.desktop new file mode 100644 index 0000000..a322681 --- /dev/null +++ b/data/desktop-links/ede-xterm.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Encoding=UTF-8 +Exec=xterm -fn 9x15 +Icon=utilities-terminal +Categories=Utility; +Name=Terminal +Comment=Standard X11 terminal diff --git a/data/desktop-links/install-in-desktop-dir.sh b/data/desktop-links/install-in-desktop-dir.sh new file mode 100755 index 0000000..8ac1e6d --- /dev/null +++ b/data/desktop-links/install-in-desktop-dir.sh @@ -0,0 +1,18 @@ +#!/bin/sh +# Create ~/Desktop/ directory if not exists and installs target file. If directory +# exists but is empty, files will be also installed. If directory is not empty, it will do nothing. + +desktop_dir="$HOME/Desktop" +targets="ede-xterm.desktop" + +[ -d $desktop_dir ] || mkdir -p $desktop_dir + +curr_dir=`dirname $0` +content=`ls $desktop_dir/*.desktop 2>>/dev/null` + +# check if directory is empty and install if it does +if test "x$content" = "x"; then + for file in $targets; do + cp $curr_dir/$file $desktop_dir + done +fi