home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / gwm18a.zip / gwm_util < prev    next >
Text File  |  1995-07-03  |  1KB  |  56 lines

  1. #!/bin/sh
  2. # shell script to help building GWM
  3. # necessary for the buggy BSD make
  4.  
  5. # usage: gwm_util function args...
  6.  
  7. set -x
  8.  
  9. case $1 in
  10.  
  11. latex)
  12.     while grep -s 'Rerun to get cross-references right' $2.log
  13.     do latex $2.tex;done
  14.     ;;
  15.  
  16. install)    # install bin-dir lib-dir
  17.     if test -f /bin/install -o -f /usr/bin/install
  18.         then INSTALL='install -c'
  19.     else INSTALL='cp'
  20.     fi
  21.     if test ! -f .rootdir
  22.     then echo "please create this directory with the \"make dir\" command!"
  23.     exit 1
  24.     fi
  25.     mv $2/gwm $2/gwm.old
  26.     $INSTALL gwm $2
  27.     mkdir $3
  28.     cd `cat .rootdir`/data
  29.     for ff in .*.gwm *.gwm *.xbm *.xpm
  30.     do
  31.     $INSTALL $ff $3
  32.     done
  33.     echo "WARNING: you may have to install by hand things in contrib"
  34.     ;;
  35.  
  36. dir|sdir)        # sdir dirname
  37.     if test -z "$2";then echo "USAGE: make DIR=mach sdir";exit 1;fi
  38.     case "$2" in */*);;*)DIR=../$2;;esac
  39.     mkdir $2
  40.     pwd >$2/.rootdir
  41.     echo  `basename $2`>$2/.dir
  42.     if test ! -f Make/Make.`basename $2`
  43.     then cp Make.TEMPLATE Make/Make.`basename $2`
  44.     fi
  45.     Pwd=`pwd`
  46.     ln -s $Pwd $2/SRC
  47.     cd $2
  48.     ln -s SRC/Make/Make.`basename $2` .
  49.     for i in  .dbxinit .gdbinit `fgrep -v / $Pwd/FILES` data
  50.     do ln -s SRC/$i .;done
  51.     cp Makefile.noXtree Makefile
  52.     echo "Now, go in $2 and edit Make.`basename $2`."
  53.     ;;
  54.  
  55. esac
  56.