qubes-linux-template-builder/appmenus/convert_app2template_for_templatevm.sh
Joanna Rutkowska f4a3f6dec9 Generate only select appmenus for AppVMs
The appmenus/whitelisted-appmenus.list file now specifies which *.desktop files
should make it into the AppVM's apps/ directory.

Also include those *.desktop files that have OnlyShownIn attribute
2011-03-30 17:27:56 +02:00

19 lines
497 B
Bash
Executable File

#!/bin/sh
SRC=$1
DSTDIR=$2
DST=$DSTDIR/$(basename $SRC)
sed -e "s/^\(Name.*\)=\(.*\)/\1=%VMNAME%: \2/" \
-e "s/^\(GenericName.*\)=\(.*\)/\1=%VMNAME%: \2/" \
-e "s/^Exec=\(.*\)/Exec=qvm-run -q --tray -a --user=root %VMNAME% \"\1\"/" \
<$SRC | \
grep -v "^Mime" | \
grep -v "^TryExec" | \
grep -v "^OnlyShowIn" | \
grep -v "^Startup" >$DST
#echo "Categories=%VMNAME%" >> $DST
echo X-Qubes-VmName=%VMNAME% >> $DST
echo Icon=%VMDIR%/icon.png >> $DST