see last try.
This commit is contained in:
parent
d1d5f21992
commit
01f7286521
1 changed files with 31 additions and 13 deletions
|
@ -1,17 +1,35 @@
|
||||||
#!/bin/rc
|
#!/bin/rc
|
||||||
|
|
||||||
rfork en
|
rfork en
|
||||||
source=https://code.9front.org/hg/plan9front
|
|
||||||
cd /
|
updating=()
|
||||||
if(! test -d .hg)
|
nl='
|
||||||
bind -ac /dist/plan9front /
|
'
|
||||||
while(! ~ $#* 0){
|
if(! test -d /dist/plan9front/.git){
|
||||||
switch($1){
|
>[1=2] echo 'end of line for hg: moving to git.'
|
||||||
case -i
|
updating=1
|
||||||
hg incoming $source
|
|
||||||
case *
|
if(! test -f /bin/git/pull){
|
||||||
echo usage: sysupdate '[-i]' >[1=2]
|
>[1=2] echo 'git is required:'
|
||||||
exit usage
|
>[1=2] echo ' cd /sys/src/cmd/git && mk install'
|
||||||
|
exit gitless
|
||||||
}
|
}
|
||||||
shift
|
|
||||||
|
>[1=2] echo ' fetching snapshot...'
|
||||||
|
cd /dist/plan9front
|
||||||
|
hget http://git.9front.org/static/plan9front-seed.tar.gz | tar xz
|
||||||
|
mv .git-snap .git
|
||||||
|
|
||||||
|
git/fs
|
||||||
|
git/walk >/dev/null
|
||||||
|
>[1=2] echo ' pulling with git...'
|
||||||
}
|
}
|
||||||
hg -v pull -u $source
|
|
||||||
|
cd /
|
||||||
|
if(! test -d .git)
|
||||||
|
bind -ac /dist/plan9front /
|
||||||
|
git/pull -u gits://git.9front.org/plan9front/plan9front
|
||||||
|
|
||||||
|
if(~ $updating 1)
|
||||||
|
>[1=2] echo 'got git: you may remove /dist/plan9front/.hg'
|
||||||
|
exit ''
|
||||||
|
|
Loading…
Reference in a new issue