Magellan Linux

Annotation of /trunk/installer/include/bootstrap-wrapper.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 773 - (hide annotations) (download) (as text)
Wed Sep 24 10:54:00 2008 UTC (15 years, 8 months ago) by niro
File MIME type: application/x-sh
File size: 1268 byte(s)
-moved helper-scripts into include/ directory

1 niro 773 #!/bin/sh
2     # $Header: /home/cvsd/magellan-cvs/magellan-src/installer/include/bootstrap-wrapper.sh,v 1.1 2008-09-24 10:54:00 niro Exp $
3    
4     # boostrap-wrapper
5     #
6     # run_bootstrap()
7     # {
8     # local line
9     #
10     # while read line
11     # do
12     # echo $line
13     # sleep 0.01
14     # done < ~/boostrap.log
15     #
16     # # bootstrap-default-system
17     # }
18    
19     convert_to_percent()
20     {
21     # never get 100% here, we define it our self or the dialogbox closes unwilingly
22     echo "$@" | sed 's/.*(\(.*\)).*/\1/;s/\//\ /g' | awk '{print ($1 / $2 * 100) - 1}'
23     }
24    
25     wrapper()
26     {
27     local action="$1"
28     local line
29    
30     ${action} | while read line
31     do
32     case $line in
33     *fetching*:*|*!fetch*|*fetch\ complete*) convert_to_percent ${line};;
34     *unpacking*:*|*!unpack*) convert_to_percent ${line};;
35     *installing*:*) convert_to_percent ${line};;
36     *) [[ ${DEBUG} = true ]] && echo "${line}" ;;
37     esac
38     done
39    
40     # 100% here, close the dialog
41     echo "100"
42     }
43    
44     # download_stage1()
45     # {
46     # NOCOLORS=true MROOT=/mnt/magellan mage download toolchain
47     # }
48     #
49     # download_stage2()
50     # {
51     # NOCOLORS=true MROOT=/mnt/magellan mage download basesystem26
52     # }
53     #
54     # install_stage1()
55     # {
56     # NOCOLORS=true MROOT=/mnt/magellan mage install toolchain
57     # }
58    
59     install_stage2()
60     {
61     NOCOLORS=true bootstrap-default-system
62     }
63    
64     ## runme
65     #wrapper "$1"
66     wrapper install_stage2

Properties

Name Value
svn:executable *