2010-04-05 22:25:37 +00:00
|
|
|
#!/bin/sh
|
|
|
|
SRC=$1
|
|
|
|
DSTDIR=$2
|
|
|
|
DST=$DSTDIR/$(basename $SRC)
|
|
|
|
|
2011-03-28 23:52:57 +00:00
|
|
|
if ! grep -q ^Name $SRC ; then
|
|
|
|
echo "WARNING: app $SRC doesn't have Name keyword, skipping..."
|
2010-04-05 22:25:37 +00:00
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2013-01-23 14:59:08 +00:00
|
|
|
sed -n -e "/^\[Desktop Entry\]$/p" \
|
|
|
|
-e "s/^\(Name.*\)=\(.*\)/\1=%VMNAME%: \2/p" \
|
2012-12-19 02:25:10 +00:00
|
|
|
-e "s/^\(GenericName.*\)=\(.*\)/\1=%VMNAME%: \2/p" \
|
|
|
|
-e "s/^Exec=\(.*\)/Exec=qvm-run -q --tray -a %VMNAME% \'\1\'/p" \
|
|
|
|
-e "/^Comment.*=/p" \
|
|
|
|
-e "/Categories=/p" <$SRC >$DST
|
2010-04-05 22:25:37 +00:00
|
|
|
|
|
|
|
echo X-Qubes-VmName=%VMNAME% >> $DST
|
|
|
|
echo Icon=%VMDIR%/icon.png >> $DST
|