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
|
|
|
|
|
|
|
|
sed -e "s/^\(Name.*\)=\(.*\)/\1=%VMNAME%: \2/" \
|
|
|
|
-e "s/^\(GenericName.*\)=\(.*\)/\1=%VMNAME%: \2/" \
|
|
|
|
-e "s/^Exec=\(.*\)/Exec=qvm-run -q --tray -a %VMNAME% \'\1\'/" \
|
|
|
|
<$SRC | \
|
|
|
|
grep -v "^Mime" | \
|
|
|
|
grep -v "^Icon" | \
|
|
|
|
grep -v "^TryExec" | \
|
2011-03-28 23:52:57 +00:00
|
|
|
grep -v "^OnlyShowIn" | \
|
2011-04-10 20:58:39 +00:00
|
|
|
grep -v "^NotShowIn" | \
|
2010-04-05 22:25:37 +00:00
|
|
|
grep -v "^Startup" >$DST
|
|
|
|
|
|
|
|
echo X-Qubes-VmName=%VMNAME% >> $DST
|
|
|
|
echo Icon=%VMDIR%/icon.png >> $DST
|