~ubuntu-branches/debian/sid/eso-midas/sid

« back to all changes in this revision

Viewing changes to .pc/fix_shellscripts.patch/system/unix/add_sccs.sh

  • Committer: Package Import Robot
  • Author(s): Ole Streicher
  • Date: 2014-04-22 14:44:58 UTC
  • Revision ID: package-import@ubuntu.com-20140422144458-sl34juxohmn4aty4
Tags: 13.09pl1.2+dfsg-1
Initial release. (Closes: #740702)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
:
 
2
#! /bin/sh
 
3
# @(#)add_sccs.sh       19.1 (ESO-IPG) 02/25/03 14:31:58 
 
4
 
 
5
cmd=`basename $0`
 
6
A=%
 
7
header=" ${A}W% (ESO-IPG) ${A}G% ${A}U%"
 
8
 
 
9
if [ -z "$1" ]; then
 
10
  echo "Usage: $cmd files"
 
11
  exit 1
 
12
fi
 
13
 
 
14
for file in $*
 
15
do
 
16
    if [ ! -f "$file" ]; then
 
17
        echo "${cmd}: $file not found"
 
18
        continue
 
19
    fi
 
20
    case $file in
 
21
 
 
22
    *.c|*.h|*.fc)
 
23
       echo '/*'$header' */' > .$file
 
24
       ;;
 
25
 
 
26
    *.for|*.incl)
 
27
       echo 'C'$header > .$file
 
28
       ;;
 
29
 
 
30
    makefile|*.sh|*.csh)
 
31
       echo '#'$header > .$file
 
32
       ;;
 
33
 
 
34
    *.prg|*.ctx)
 
35
       echo '!'$header > .$file
 
36
       ;;
 
37
 
 
38
    *.com)
 
39
       echo '$ !'$header > .$file
 
40
       ;;
 
41
 
 
42
    *.hlq|*.doc|*.alc|*.alq|*.twh|*.tex)
 
43
       echo '%'$header > .$file
 
44
       ;;
 
45
 
 
46
    *.n)
 
47
       echo '.\"'$header > .$file
 
48
       ;;
 
49
 
 
50
    *.mar)
 
51
       echo ';'$header > .$file
 
52
       ;;
 
53
 
 
54
    *)
 
55
       echo 'File '$file' requires no SCCS header'
 
56
       touch .$file
 
57
       ;;
 
58
 
 
59
    esac
 
60
 
 
61
   cat $file >> .$file
 
62
   mv .$file $file
 
63
 
 
64
done
 
65
 
 
66