How do you do! I am not good at the English, but report it.
<jwm.tcz bug and change plan report>
TinyCore V2.4.1 and 2.5 and 2.6rc4
Boot option normal and backup/restore
file:/usr/bin/jwm_makemenu
before-----bug
ctrl+alt+bs key in to text mode. After "startx" and the enter.
Mouse click's Main menu => Apps menu double.
After------before 7,8lines change
[ -z "$1" ] && exit 1 --- line first done
cp "$TCEMENU" "$OUTFILE" --- line was added to "|| exit 1"
Check to use "grep" command.
if "menu" entry and "$1" are the same, program to exit.
before----------------------------------------------------------------
#!/bin/sh
# (c) Robert Shingledecker 2009
# Typically called from /usr/bin/desktop.sh
# makemenu APPNAME
TCEMENU=/usr/local/tce.menu/menu
OUTFILE=/tmp/menu.tmp
cp "$TCEMENU" "$OUTFILE"
[ -z "$1" ] && exit 1
busybox awk -v appname="$1" -v outfile="$OUTFILE" '
{
if ( $2 == "TCE_Placeholder" )
{
holder = $0
while (( getline < "/usr/local/tce.menu/"appname ) > 0 )
{
if ( index($0,"Program label=") > 0 )
{
sub(">",">exec ")
print $0 > outfile
} else {
if ( index($0,"JWM") == 0 )
{
print $0 > outfile
}
}
}
close("/usr/local/tce.menu/"appname)
print holder > outfile
} else {
print $0 > outfile
}
} ' "$TCEMENU"
[ "$?" == 0 ] && sudo mv "$OUTFILE" "$TCEMENU"
--------------------------------------------------------------------------------
|
|
|/
after-----------------------------------------------------------------
#!/bin/sh
# (c) Robert Shingledecker 2009
# Typically called from /usr/bin/desktop.sh
# makemenu APPNAME
TCEMENU=/usr/local/tce.menu/menu
OUTFILE=/tmp/menu.tmp
[ -z "$1" ] && exit 1
cp "$TCEMENU" "$OUTFILE" || exit 1
grep -q "$1" "$TCEMENU" > NULL
[ "$?" == 0 ] && exit 1
busybox awk -v appname="$1" -v outfile="$OUTFILE" '
{
if ( $2 == "TCE_Placeholder" )
{
holder = $0
while (( getline < "/usr/local/tce.menu/"appname ) > 0 )
{
if ( index($0,"Program label=") > 0 )
{
sub(">",">exec ")
print $0 > outfile
} else {
if ( index($0,"JWM") == 0 )
{
print $0 > outfile
}
}
}
close("/usr/local/tce.menu/"appname)
print holder > outfile
} else {
print $0 > outfile
}
} ' "$TCEMENU"
[ "$?" == 0 ] && sudo mv "$OUTFILE" "$TCEMENU"
--------------------------------------------------------------------------------
Please check it.