diff options
author | Michael Jennings <mej@kainx.org> | 2001-06-14 05:31:09 +0000 |
---|---|---|
committer | Michael Jennings <mej@kainx.org> | 2001-06-14 05:31:09 +0000 |
commit | 3a471bb33ee5f7fc6589e217f24629b36872a28d (patch) | |
tree | e6ff121b03d73ece2c57505d3662e45c607fb52a /utils | |
parent | 379d83a852d08f747098be93464d7c3b087d7760 (diff) | |
download | eterm-3a471bb33ee5f7fc6589e217f24629b36872a28d.tar.gz |
Wed Jun 13 21:13:51 PDT 2001 Michael Jennings <mej@eterm.org>
There is now a new mechanism for dealing with the background image
collection, including a new update script. Please read the newly-
rewritten bg/README.backgrounds for details.
Also, I'm trying to flesh out the Contributors list in that file, but
my memory isn't cooperating. So if you contributed one of the
backgrounds, or know someone who did, please let me know.
SVN revision: 4810
Diffstat (limited to 'utils')
-rwxr-xr-x | utils/Etbg_update_list | 68 | ||||
-rw-r--r-- | utils/Makefile.am | 6 |
2 files changed, 70 insertions, 4 deletions
diff --git a/utils/Etbg_update_list b/utils/Etbg_update_list new file mode 100755 index 0000000..b91249b --- /dev/null +++ b/utils/Etbg_update_list @@ -0,0 +1,68 @@ +#!/bin/sh -x +# +# Eterm backgrounds list file update utility +# +# $Id$ + +LISTFILE=pixmaps.list + +if [ $# -gt 1 -o "X$1" = "X-h" -o "X$1" = "X--help" ]; then + echo "Syntax: Etbg_update_list [path]" + echo " (The default path is the current directory.)" + echo + exit 0 +fi + +# Find the pixmap directory +for i in "$1" "$PWD" "$PWD/pix" "$PWD/../pix" ; do + if [ -d "$i/tile" -o -d "$i/scale" ]; then + PIXDIR="$i" + break + fi +done + +cd $PIXDIR + +# Generate new pixmap list from tile/ and scale/ directories +echo "Etbg_update_list: Generating pixmap list file from images in tile/ and scale/..." +true > $LISTFILE.new + +if [ -d tile ]; then + for i in `(cd tile && ls -1)` ; do + echo '"tile/'$i'@0x0+0+0:tile"' >> $LISTFILE.new + done +fi + +if [ -d scale ]; then + for i in `(cd scale && ls -1)` ; do \ + echo '"scale/'$i'@100x100"' >> $LISTFILE.new ; \ + done +fi + +# Check to see if the list has changed. If so, back up the old one. +if [ -s $LISTFILE ]; then + if (diff $LISTFILE $LISTFILE.new >/dev/null 2>&1); then + echo "Pixmap list is unchanged." + rm -f $LISTFILE.new + else + echo "Old pixmap list will be saved in $LISTFILE.old" + mv -f $LISTFILE $LISTFILE.old + fi +fi +if [ -s $LISTFILE.new ]; then + mv -f $LISTFILE.new $LISTFILE +fi + +# If there's no theme directory nearby, just quit. +if [ ! -d "../themes" ]; then + exit 0 +fi + +# If there is, cd into it and make sure all the themes have list files. +cd ../themes +for i in `ls -1` ; do + if [ -f $i/theme.cfg -a ! -e $i/$LISTFILE ]; then + echo "Creating symlink to $LISTFILE for theme $i" + (cd $i && ln -sf ../../pix/$LISTFILE $LISTFILE) + fi +done diff --git a/utils/Makefile.am b/utils/Makefile.am index 29c33e9..6f6e373 100644 --- a/utils/Makefile.am +++ b/utils/Makefile.am @@ -1,7 +1,7 @@ # $Id$ bin_PROGRAMS = Esetroot Etbg Ettable -bin_SCRIPTS = Etcolors Etsearch kEsetroot +bin_SCRIPTS = Etcolors Etsearch kEsetroot Etbg_update_list Esetroot_SOURCES = Esetroot.c Esetroot_LDFLAGS = -rpath $(libdir):$(pkglibdir) @@ -9,6 +9,4 @@ Esetroot_LDFLAGS = -rpath $(libdir):$(pkglibdir) Etbg_SOURCES = Etbg.c Ettable_SOURCES = Ettable.c -EXTRA_DIST = Etbg.c Esetroot.c Ettable.c Makefile.am \ - Makefile.in Etcolors Etsearch kEsetroot.in - +EXTRA_DIST = Etcolors Etsearch kEsetroot.in Etbg_update_list |