diff options
author | eroen <eroen@occam.eroen.eu> | 2014-09-08 18:26:05 +0200 |
---|---|---|
committer | eroen <eroen@occam.eroen.eu> | 2014-09-08 18:26:05 +0200 |
commit | 3b64609e0aada4dffe3203b46d0037e1d3ac8d65 (patch) | |
tree | 5e8a6687c220aaf020e692b42885dcb5fd37133e /wine.eselect | |
parent | Move to /usr/lib/ (diff) | |
download | eselect-wine-3b64609e0aada4dffe3203b46d0037e1d3ac8d65.tar.gz eselect-wine-3b64609e0aada4dffe3203b46d0037e1d3ac8d65.tar.bz2 eselect-wine-3b64609e0aada4dffe3203b46d0037e1d3ac8d65.zip |
Handle .desktop file
Diffstat (limited to 'wine.eselect')
-rw-r--r-- | wine.eselect | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/wine.eselect b/wine.eselect index 464eb77..fa1029f 100644 --- a/wine.eselect +++ b/wine.eselect @@ -11,11 +11,13 @@ EXECUTABLES=(msiexec notepad regedit regsvr32 widl wine wine64 wine64-preloader wineboot winebuild winecfg wineconsole winecpp winedbg winefile wineg++ winegcc winemine winepath wine-preloader wineserver wmc wrc) MANDIR=/usr/share/man -MANPAGES=( man1/widl.1 man1/winebuild.1 man1/winegcc.1 man1/wineg++.1 +MANPAGES=(man1/widl.1 man1/winebuild.1 man1/winegcc.1 man1/wineg++.1 man1/winecpp.1 man1/wineserver.1 man1/wine.1 man1/wmc.1 man1/wrc.1 man1/msiexec.1 man1/notepad.1 man1/regedit.1 man1/regsvr32.1 man1/wineboot.1 man1/winecfg.1 man1/wineconsole.1 man1/winedbg.1 man1/winefile.1 man1/winemine.1 man1/winepath.1) +DESKTOPFILES=(wine.desktop) +DESKTOPDIR=/usr/share/applications # TODO: # sort function for kernel versions, to be used in a pipe @@ -59,6 +61,11 @@ remove_symlinks() { rm "${EROOT}/${MANDIR}/${page}" || return 1 fi done + for d in "${DESKTOPFILES[@]}"; do + if [[ -L ${EROOT}/${DESKTOPDIR}/${d} ]]; then + rm "${EROOT}/${DESKTOPDIR}/${d}" || return 1 + fi + done return 0 } @@ -89,6 +96,12 @@ set_symlinks() { fi done + for d in "${DESKTOPFILES[@]}"; do + if [[ -f ${EROOT}${PREFIXDIR}/${target}/applications/${d} ]]; then + ln -s "${EROOT}${PREFIXDIR}/${target}/applications/${d}" "${EROOT}/${DESKTOPDIR}/${d}" || return 1 + fi + done + else die -q "Target \"$1\" doesn't appear to be valid!" fi |