]> git.lizzy.rs Git - plan9front.git/blob - rc/bin/sysupdate
Remove ap(1)
[plan9front.git] / rc / bin / sysupdate
1 #!/bin/rc
2
3 rfork en
4
5 updating=()
6 nl='
7 '
8 if(! test -d /dist/plan9front/.git){
9         >[1=2] echo 'end of line for hg: moving to git.'
10         updating=1
11
12         if(! test -f /bin/git/pull){
13                 >[1=2] echo 'git is required:'
14                 >[1=2] echo '   cd /sys/src/cmd/git && mk install'
15                 exit gitless
16         }
17
18         >[1=2] echo '   fetching snapshot...'
19         cd /dist/plan9front
20         hget http://git.9front.org/static/plan9front-seed.tar.gz | tar xz
21         mv .git-snap .git
22
23         git/fs
24         git/walk >/dev/null
25         >[1=2] echo '   pulling with git...'
26 }
27
28 cd /
29 if(! test -d .git)
30         bind -ac /dist/plan9front /
31 git/pull -u gits://git.9front.org/plan9front/plan9front
32
33 if(~ $updating 1)
34         >[1=2] echo 'got git: you may remove /dist/plan9front/.hg'
35 exit ''