diff options
author | Frederic Crozat <fcrozat@mandriva.com> | 2005-08-10 05:51:48 +0000 |
---|---|---|
committer | Frederic Crozat <fcrozat@mandriva.com> | 2005-08-10 05:51:48 +0000 |
commit | 31a7117857934f181494b044c07e4496a8df6725 (patch) | |
tree | 6d8a82d5a7cc6f70001a9f4eff7e802d0f94c35b /xinit.d | |
parent | 01c40f00897ecfe39509df630c2ba7051b6cb1e8 (diff) | |
download | common-data-31a7117857934f181494b044c07e4496a8df6725.tar common-data-31a7117857934f181494b044c07e4496a8df6725.tar.gz common-data-31a7117857934f181494b044c07e4496a8df6725.tar.bz2 common-data-31a7117857934f181494b044c07e4496a8df6725.tar.xz common-data-31a7117857934f181494b044c07e4496a8df6725.zip |
Generate .desktop from templates and copy them to $HOME at login
Diffstat (limited to 'xinit.d')
-rwxr-xr-x | xinit.d/desktop-directories | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/xinit.d/desktop-directories b/xinit.d/desktop-directories new file mode 100755 index 0000000..8355152 --- /dev/null +++ b/xinit.d/desktop-directories @@ -0,0 +1,15 @@ +#!/bin/sh + +USER_STAMP=$HOME/.mdk-desktop + +if [ ! -f $USER_STAMP ]; then + for file in /usr/share/mdk/menu/*-mdk.desktop.in ; do + echo $file + DIRECTORY_PATH="$HOME/`grep URL $file | sed -e 's|URL=file://\$HOME/||g'`" + FILE_PATH=$HOME/`basename $file .in` + [ -d "$DIRECTORY_PATH" ] || mkdir -p $DIRECTORY_PATH + [ -f $FILE_PATH ] || cat $file | sed -e "s|\$HOME|${HOME}|g" > $FILE_PATH + done + touch $USER_STAMP +fi + |