For bug #181953, prevent the circular_blocks code from selecting a node that's alread...
[portage.git] / tarball.sh
1 #!/bin/bash
2 # $Id$
3
4 if [ -z "$1" ]; then
5         echo
6         echo "You need to have the version specified."
7         echo "e.g.: $0 2.0.39-r37"
8         echo
9         exit 0
10 fi
11
12 export PKG="portage"
13 export TMP="/tmp"
14 export V="$1"
15 export DEST="${TMP}/${PKG}-${V}"
16 export PREVEB="2.0.49_pre2"
17
18 ./tabcheck.py bin/emerge `find ./ -type f -name '*.py'`
19
20 if [ -e $TMP/${PKG}-${V} ]; then
21         echo EXISTS ALREADY
22         exit 1
23 fi
24
25 rm -rf ${DEST}
26 install -d -m0755 ${DEST}
27 #get any binaries out of the way
28 cd src/sandbox-1.1
29 make clean
30 cd ../..
31 for x in bin cnf man pym src 
32 do
33         cp -ax $x ${DEST}
34 done
35 # Clean invalid sandbox sources
36 rm -rf ${DEST}/src/{sandbox,sandbox-dev}
37 cp ${DEST}/pym/portage.py ${DEST}/pym/portage.py.orig
38 sed '/^VERSION=/s/^.*$/VERSION="'${V}'"/' < ${DEST}/pym/portage.py.orig > ${DEST}/pym/portage.py
39 cp ${DEST}/man/emerge.1 ${DEST}/man/emerge.1.orig
40 sed "s/##VERSION##/${V}/g" < ${DEST}/man/emerge.1.orig > ${DEST}/man/emerge.1
41 rm ${DEST}/pym/portage.py.orig ${DEST}/man/emerge.1.orig
42 rm ${DEST}/man/*.eclass.5
43
44 sed -i -e "s:\t:  :g" ChangeLog
45 cp ChangeLog ${DEST}
46
47 cd ${DEST}
48 find -name CVS -exec rm -rf {} \;
49 find -name '*~' -exec rm -rf {} \;
50 find -name '*.pyc' -exec rm -rf {} \;
51 find -name '*.pyo' -exec rm -rf {} \;
52 chown -R root:root ${DEST}
53 cd $TMP
54 rm -f ${PKG}-${V}/bin/emerge.py ${PKG}-${V}/bin/{pmake,sandbox} ${PKG}-${V}/{bin,pym}/'.#'* ${PKG}-${V}/{bin,pym}/*.{orig,diff} ${PKG}-${V}/{bin,pym}/*.py[oc]
55 tar cjvf ${TMP}/${PKG}-${V}.tar.bz2 ${PKG}-${V}
56
57 #scp ${TMP}/${PKG}-${V}.tar.bz2 carpaski@twobit.net:/home/html/gentoo/portage/
58 #scp ${TMP}/${PKG}-${V}.tar.bz2 carpaski@zarquon.twobit.net:/home/www/localhost/htdocs/gentoo/portage/