summaryrefslogtreecommitdiff
blob: a6238a54093bf526c6acdf43178c19fe5dd088a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/bin/sh
#
# $Header: /var/cvsroot/gentoo-x86/profiles/default-sparc-1.0/scripts/generate-packages.sh,v 1.2 2002/04/16 20:37:57 murphy Exp $
#
# New packages file
NEWPACKAGESBUILD=packages.build
NEWUSEDEFAULTS=use.defaults
NEWPACKAGES=packages
NEWDEFAULTS=make.defaults
NEWVIRTUALS=virtuals

KEEPPACKAGESBUILD=.packages.build.keep
KEEPUSEDEFAULTS=.use.defaults.keep
KEEPPACKAGES=.packages.keep
KEEPDEFAULTS=.make.defaults.keep
KEEPVIRTUALS=.virtuals.keep

# Sanity checks
if [ ! -r packages.sparc ]
then
	echo This script must be run from the /usr/portage/profiles/default-sparc-* tree.
	exit 1
fi

# Variables
from_version=1.0
from_dir=../default-${from_version}


# 1) Make our own packages version
cp -p $NEWPACKAGES $KEEPPACKAGES
echo "# This file created automagically by $0 on `date`" > $NEWPACKAGES
echo "" >> $NEWPACKAGES
sed -e 's:.*sys-apps/grub:#*sys-apps/grub:' \
	-e 's:.*sys-devel/bin86:#*sys-devel/bin86:' \
	-e 's:.*sys-apps/lilo:#*sys-apps/lilo:' \
	${from_dir}/packages >> $NEWPACKAGES
cat >> $NEWPACKAGES <<_EOF_

# These lines added by $0 -----------------------
_EOF_
cat >> $NEWPACKAGES < packages.sparc
cat >> $NEWPACKAGES <<_EOF_
# End of lines added by $0 ----------------------
_EOF_


# 2) Update make.defaults
cp -p $NEWDEFAULTS $KEEPDEFAULTS
echo "# This file created automagically by $0 on `date`" > $NEWDEFAULTS
echo "" >> $NEWDEFAULTS
cat ${from_dir}/make.defaults >> $NEWDEFAULTS
cat >> $NEWDEFAULTS <<_EOF_

# These lines added by $0 -----------------------
_EOF_
cat >> $NEWDEFAULTS < make.defaults.sparc
cat >> $NEWDEFAULTS <<_EOF_
# End of lines added by $0 ----------------------
_EOF_

# 3) use.defaults
cp -p $NEWUSEDEFAULTS $KEEPUSEDEFAULTS
cp -p ${from_dir}/use.defaults $NEWUSEDEFAULTS

# 4) packages.build
cp -p $NEWPACKAGESBUILD $KEEPPACKAGESBUILD
cp -p ${from_dir}/packages.build $NEWPACKAGESBUILD

# 5) virtuals
cp -p $NEWVIRTUALS $KEEPVIRTUALS
cp -p ${from_dir}/packages.build $NEWVIRTUALS