#!/bin/sh # (c) Robert Shingledecker 2010 # Called from startx to setup initial hackedbox system, tce, & ondemand menus. writeMenuItem() { busybox awk ' BEGIN { FS = "=" } { if ( $1 == "Name") { name = $2 gsub(/ /, "", name) } else if ( $1 == "Exec" ) { exec = $2 test = match(exec,"%") if ( test ) exec = substr(exec,0,test-1) } else if ( $1 == "Terminal" ) { terminal = $2 } } END { if ( terminal == "true" ) { print "exec aterm +tr +sb -T \""name"\" -e " exec"" } else { print "exec "exec"" } } ' "$1" }