mail-uplift fix lines before and after message separator
[ipreg/sccs2rcs2cvs2git.git] / ipreg-post-uplift
1 #!/bin/sh
2
3 B="\e[32m"
4 D="\e[0m"
5
6 set -e -x
7
8 : $B POST-UPLIFT START $(date +%Y-%m-%d.%H:%M:%S) $D
9
10 cd ip-register
11 find . -type l |
12 while read link
13 do
14 target=$(readlink $link)
15 case $target in
16 (Attic) (
17 cd ../ipreg-git
18 git rm $link
19 ) ;;
20 (*) (
21 cd ../ipreg-git
22 mkdir -p $(dirname $link)
23 ln -s $target $link
24 git add $link
25 ) ;;
26 esac
27 rm -f $link
28 done
29
30 cd ../ipreg-git
31 git commit -m 'post-uplift: delete missing files and add symlinks'
32
33 git rm -r old-group-Internet
34 git rm -r archive
35 git rm -r Mail
36 git rm -r DNS/historic
37 git rm -r db/historic
38 git rm -r db/web/doc/historic
39 git rm -r db/web/perl/historic
40 git commit -m 'post-uplift: delete historical artefacts'
41
42 : $B POST-UPLIFT DONE $(date +%Y-%m-%d.%H:%M:%S) $D