aboutsummaryrefslogtreecommitdiffstats
path: root/xinit.d/desktop-directories
blob: 83551520ea75e1b930f27488ee0328efbe1d42a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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