/[gentoo-x86]/autocompile.sh
Gentoo

Contents of /autocompile.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download) (as text)
Sun Nov 19 12:17:29 2000 UTC (17 years, 11 months ago) by achim
Branch: MAIN
Changes since 1.2: +44 -81 lines
File MIME type: text/x-sh
Dependencies stuff

1 achim 1.1 #!/bin/sh
2    
3    
4     C_NORMAL=$'\033[0m'
5     C_HILITE=$'\e[36;01m'
6 achim 1.3 C_END=$'\e[A\e[68G'
7 achim 1.1 C_OK=$'\e[32m'
8     C_NO=$'\e[31m'
9 achim 1.2 PORTDIR=/usr/portage
10 achim 1.3 LOGDIR=$ROOT/tmp/portage-log
11     STEPS="check fetch clean unpack compile install qmerge clean"
12    
13     do_step() {
14    
15     echo "$C_END $C_HILITE "
16     echo "$C_END $C_HILITE [$1] "
17     ebuild $myd $1 &> $myl/$1
18     mye=$?
19    
20     if [ -f $LOGDIR/$1 ]
21     then
22     cp $LOGDIR/$1 /tmp/failed
23     grep -v "$i" /tmp/failed > $LOGDIR/$1
24     fi
25    
26     if [ $mye -ne 0 ]
27     then
28     echo "$C_END $C_HILITE "
29     echo "$C_END $C_NO [$1] "
30     echo $i >> $LOGDIR/$1
31     fi
32     }
33 achim 1.1
34     if [ -z "${ROOT}" ]
35     then
36     echo "ROOT not set !"
37     exit 1
38     fi
39    
40     mylist=${PORTDIR}/gentoo-x86/current-packages
41    
42     if [ -f "${1}" ]
43     then
44     mylist=${1}
45     fi
46    
47     mypackages="`grep -v "\#.*" $mylist`"
48    
49    
50 achim 1.3 mkdir -p $ROOT/tmp/portage-log
51 achim 1.1
52 achim 1.3 echo "$C_HILITE>>>$C_NORMAL Building from ${mylist}..."
53 achim 1.1 for i in $mypackages
54     do
55    
56     # full path
57     myd=${i/.\//$PORTDIR\/gentoo-x86\/}
58    
59     # file name
60     myf="`basename $myd`"
61    
62     # category
63     myc="`echo $i | sed -e "s:^\./\(.*\).*/.*/.*$:\1:"`"
64    
65     # package name
66     myp=${myf%*.ebuild}
67    
68     if [ -f "$myd" ]
69     then
70    
71 achim 1.3 # Check if installed
72     if [ -d ${ROOT}var/db/pkg/$myc/$myp ]
73 achim 1.1 then
74     continue
75     fi
76    
77 achim 1.3 echo "$C_NORMAL$myp ($myc)"
78 achim 1.1
79 achim 1.3 myl="$LOGDIR/$myc/$myp/"
80     mkdir -p $myl
81 achim 1.1
82 achim 1.3 for j in ${STEPS}
83     do
84     mye=0
85     do_step $j
86     if [ $mye -ne 0 ]
87     then
88     break
89     fi
90     done
91     if [ $mye -eq 0 ]
92     then
93     echo "$C_END $C_OK [OK] "
94 achim 1.1 fi
95 achim 1.3
96 achim 1.1 else
97     echo "!!! $myd does not exists !"
98     fi
99     done

  ViewVC Help
Powered by ViewVC 1.1.20