#!/bin/sh # (c) Robert Shingledecker 2009 # Typically called from /usr/bin/desktop.sh # makemenu APPNAME . /etc/init.d/tc-functions . /usr/local/bin/jwm_menu_common [ -z "$1" ] && exit 1 TCEMENU=/usr/local/tce.jwm OUTFILE=/tmp/menu.tmp > "$OUTFILE" # Check for freedesktop item FREEDESK="/usr/local/share/applications" if [ -e "$FREEDESK"/"$1".desktop ]; then if [ -e "$FREEDESK"/"$1"~1.desktop ]; then echo "
" >> "$OUTFILE" else writeMenuItem "$FREEDESK"/"$1".desktop >> "$OUTFILE" fi merge "$OUTFILE" "$TCEMENU" "TCE_END" > /tmp/newmenu sudo mv /tmp/newmenu "$TCEMENU" fi