File: 06configfiles.dpatch

package info (click to toggle)
efax 1%3A0.9a-20
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 452 kB
  • sloc: ansic: 4,629; sh: 932; makefile: 77
file content (46 lines) | stat: -rw-r--r-- 1,167 bytes parent folder | download | duplicates (3)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#! /bin/sh -e
## 06configfiles by Paolo P.
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Actually read other CONFIGFILES
## DP: (Closes: #198149)

if [ $# -ne 1 ]; then
    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
    exit 1
fi
case "$1" in
	-patch) patch -f --no-backup-if-mismatch --dry-run -p1 < $0 && patch -f --no-backup-if-mismatch -p1 < $0;;
	-unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;;
	*)
		echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
		exit 1;;
esac
exit 0

@DPATCH@
diff -Nuar efax-0.9a.orig/fax efax-0.9a/fax
--- efax-0.9a.orig/fax	Sat Apr 19 00:00:00 2003
+++ efax-0.9a.orig/fax	Fri Jun 20 07:57:05 2003
@@ -408,13 +408,17 @@
 # ****************************************************************
 
 # --- source configuration files
-
-for f in $CONFIGFILES
-do
+oCONFIGFILES=
+while [ "$CONFIGFILES" != "$oCONFIGFILES" ]; do
+# loop needed if we allow CONFIGFILES to change in default CONFIGFILES'
+  oCONFIGFILES=$CONFIGFILES
+  for f in $CONFIGFILES
+  do
 	if [ -r $f ]
 	then
 		. $f
 	fi
+  done
 done
 
 # --- set any variables given on command line