File: upd_make.sh

package info (click to toggle)
gnuplot 3.5beta6.347-3
  • links: PTS
  • area: main
  • in suites: slink
  • size: 5,032 kB
  • ctags: 4,235
  • sloc: ansic: 42,086; makefile: 561; asm: 539; sh: 386; objc: 379; csh: 297; pascal: 194; perl: 138; lisp: 88
file content (28 lines) | stat: -rw-r--r-- 608 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#! /bin/sh
#
# $Id: upd_make.sh,v 1.1 1996/08/05 20:01:11 drd Exp $
#
# shell script to update all makefiles which include makefile.all
# after makefile.all has changed.
# simply uses sed to delete all lines between <<<makefile.all and
# >>>makefile.all
# partially derived from errorfix.sh

for i in makefile.* Makefile.in
do
  if [ $i = makefile.all ]
  then
    continue
  fi
  sed -e '/<<<makefile.all/r makefile.all' \
      -e '/<<<makefile.all/,/>>>makefile.all/d' $i > .tmp
  if cmp -s $i .tmp
  then
    echo skipped $i
    rm .tmp
  else
   echo updated $i
   mv $i $i.dist
   mv .tmp $i
  fi
done