mzs: adjust relative paths to match ipreg repo
[ipreg/sccs2rcs2cvs2git.git] / ipreg-archive-uplift
1 #!/bin/sh
2
3 # A special case to avoid cluttering sccs2cvs
4
5 # WARNING this script takes about two hours to run. There are nearly
6 # 20,000 revisions in the hosts.131.111 history, and commits to the
7 # RCS file take longer the larger it gets...
8
9 set -e -x
10
11 mkdir -p ipreg-archive
12 cd ipreg-archive
13
14 : ARCHIVE-UPLIFT START $(date +%Y-%m-%d.%H:%M:%S)
15
16 for d in ../ip-register/archive/archive/DB \
17 ../ip-register/archive/archive/Hosts
18 do
19 first=true
20 for sfile in $d/s.*
21 do
22 : uplift $sfile $(date +%Y-%m-%d.%H:%M:%S)
23 [ -f "$sfile" ] || break
24 file="${sfile#*/s.}"
25 filev="${file},v"
26 basev="${file%.????????},v"
27 if $first
28 then
29 sccs2rcs1 "$sfile"
30 mv "$filev" "$basev"
31 first=false
32 else
33 sccs2rcs1 -a"$basev" "$sfile"
34 fi
35 rm "$sfile"
36 done
37 done
38
39 sccs2rcs1 -aDB.cam,v ../ip-register/DNS/SCCS/s.DB.cam
40 sccs2rcs1 -ahosts.131.111,v ../ip-register/adm/SCCS/s.hosts.131.111
41
42 : ARCHIVE-UPLIFT DONE $(date +%Y-%m-%d.%H:%M:%S)