Sun Aug 17 09:55:43 2003 Michael Jennings (mej)
Modified and applied a patch from Marc Merlin <marc@merlins.org> to auto-generate the pixmap menu entries via the Etbg_update_list script. You can now pass "-m /path/to/menufile" to Etbg_update_list to generate the entries in the specified file. Hopefully I'll make this process automated, at least on my end, in the near future. SVN revision: 7336
This commit is contained in:
parent
d1ff8c45cf
commit
16a35e6a1e
|
@ -5067,3 +5067,11 @@ too intrusive.
|
||||||
Added support for Ctrl-t to open a new Escreen "tab" (as with
|
Added support for Ctrl-t to open a new Escreen "tab" (as with
|
||||||
Mozilla).
|
Mozilla).
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
Sun Aug 17 09:55:43 2003 Michael Jennings (mej)
|
||||||
|
|
||||||
|
Modified and applied a patch from Marc Merlin <marc@merlins.org> to
|
||||||
|
auto-generate the pixmap menu entries via the Etbg_update_list
|
||||||
|
script. You can now pass "-m /path/to/menufile" to Etbg_update_list
|
||||||
|
to generate the entries in the specified file. Hopefully I'll make
|
||||||
|
this process automated, at least on my end, in the near future.
|
||||||
|
----------------------------------------------------------------------
|
||||||
|
|
|
@ -6,7 +6,18 @@
|
||||||
|
|
||||||
LISTFILE=pixmaps.list
|
LISTFILE=pixmaps.list
|
||||||
|
|
||||||
if [ $# -gt 1 -o "X$1" = "X-h" -o "X$1" = "X--help" ]; then
|
if [ "x$1" = "x-m" ]; then
|
||||||
|
echo "Mmmm, got menu file $2"
|
||||||
|
shift
|
||||||
|
ETBG_MENUFILE="$1"
|
||||||
|
export ETBG_MENUFILE
|
||||||
|
shift
|
||||||
|
exec 3> "$ETBG_MENUFILE"
|
||||||
|
else
|
||||||
|
exec 3>/dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "x$1" = "x-h" -o "x$1" = "x--help" ]; then
|
||||||
echo "Syntax: Etbg_update_list [path]"
|
echo "Syntax: Etbg_update_list [path]"
|
||||||
echo " (The default path is the current directory.)"
|
echo " (The default path is the current directory.)"
|
||||||
echo
|
echo
|
||||||
|
@ -23,21 +34,45 @@ done
|
||||||
|
|
||||||
cd $PIXDIR
|
cd $PIXDIR
|
||||||
|
|
||||||
|
# Make sure sed works; if not, use perl
|
||||||
|
SEDCMD="sed -e 's/[-_]/ /g' -e 's/^\(.\)/\u\1/' -e 's/ \(.\)/ \u\1/g' -e 's/\....$//'"
|
||||||
|
if [ "x`echo i | sed -e 's/^\(.\)/\u\1/'`" != "xI" ]; then
|
||||||
|
SEDCMD='perl -p -e "s/[-_]/ /g; s/^(.)/\u\1/; s/ (.)/ \u\1/g; s/\....$//;"'
|
||||||
|
fi
|
||||||
|
|
||||||
# Generate new pixmap list from tile/ and scale/ directories
|
# Generate new pixmap list from tile/ and scale/ directories
|
||||||
echo "Etbg_update_list: Generating pixmap list file from images in tile/ and scale/..."
|
echo "Etbg_update_list: Generating pixmap list file from images in tile/ and scale/..."
|
||||||
true > $LISTFILE.new
|
true > $LISTFILE.new
|
||||||
|
|
||||||
|
cat >&3 <<EOF
|
||||||
|
begin menu
|
||||||
|
title Tiled
|
||||||
|
EOF
|
||||||
if [ -d tile ]; then
|
if [ -d tile ]; then
|
||||||
for i in `(cd tile && ls -1)` ; do
|
for i in `(cd tile && ls -1)` ; do
|
||||||
echo '"tile/'$i'@0x0+0+0:tile"' >> $LISTFILE.new
|
echo '"tile/'$i'@0x0+0+0:tile"' >> $LISTFILE.new
|
||||||
|
echo " begin menuitem" >&3
|
||||||
|
eval echo "\ \ \ \ text \\\"\`echo $i | $SEDCMD\`\\\"" >&3
|
||||||
|
echo " action string \"\\e]20;tile/$i;0x0+0+0:tile\\a\"" >&3
|
||||||
|
echo " end" >&3
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
cat >&3 <<EOF
|
||||||
|
end
|
||||||
|
begin menu
|
||||||
|
title Scaled
|
||||||
|
EOF
|
||||||
|
|
||||||
if [ -d scale ]; then
|
if [ -d scale ]; then
|
||||||
for i in `(cd scale && ls -1)` ; do \
|
for i in `(cd scale && ls -1)` ; do \
|
||||||
echo '"scale/'$i'@100x100"' >> $LISTFILE.new ; \
|
echo '"scale/'$i'@100x100"' >> $LISTFILE.new ; \
|
||||||
|
echo " begin menuitem" >&3
|
||||||
|
eval echo "\ \ \ \ text \\\"\`echo $i | $SEDCMD\`\\\"" >&3
|
||||||
|
echo " action string \"\\e]20;tile/$i;0x0+0+0:tile\\a\"" >&3
|
||||||
|
echo " end" >&3
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
echo "end" >&3
|
||||||
|
|
||||||
# Check to see if the list has changed. If so, back up the old one.
|
# Check to see if the list has changed. If so, back up the old one.
|
||||||
if [ -s $LISTFILE ]; then
|
if [ -s $LISTFILE ]; then
|
||||||
|
|
Loading…
Reference in New Issue