summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaarten Thibaut <murphy@gentoo.org>2002-08-14 14:20:57 +0000
committerMaarten Thibaut <murphy@gentoo.org>2002-08-14 14:20:57 +0000
commitf6b28503d179dfa885412b1192861ac0ceacb9b2 (patch)
treeee68272ce9bd6da7bdc6ef74c5db9a368fb3321a /profiles/default-sparc-1.0
parentversion bump (diff)
downloadhistorical-f6b28503d179dfa885412b1192861ac0ceacb9b2.tar.gz
historical-f6b28503d179dfa885412b1192861ac0ceacb9b2.tar.bz2
historical-f6b28503d179dfa885412b1192861ac0ceacb9b2.zip
new script to generate the profile files
Diffstat (limited to 'profiles/default-sparc-1.0')
-rw-r--r--profiles/default-sparc-1.0/scripts/build-rel.sh42
1 files changed, 42 insertions, 0 deletions
diff --git a/profiles/default-sparc-1.0/scripts/build-rel.sh b/profiles/default-sparc-1.0/scripts/build-rel.sh
new file mode 100644
index 000000000000..a78c310e9c85
--- /dev/null
+++ b/profiles/default-sparc-1.0/scripts/build-rel.sh
@@ -0,0 +1,42 @@
+#!/bin/sh
+#
+# $Header: /var/cvsroot/gentoo-x86/profiles/default-sparc-1.0/scripts/build-rel.sh,v 1.1 2002/08/14 14:20:57 murphy Exp $
+#
+# Where we get the sauce
+SOURCE=../default-x86-2.0
+
+# New packages file
+FILES="packages.build use.defaults packages make.defaults virtuals"
+
+keepfile() {
+ FILE=${1}
+ if [ -s .${FILE}.keep.6 ]; then rm .${FILE}.keep.6; fi
+ if [ -s .${FILE}.keep.5 ]; then mv .${FILE}.keep.5 .${FILE}.keep.6; fi
+ if [ -s .${FILE}.keep.4 ]; then mv .${FILE}.keep.4 .${FILE}.keep.5; fi
+ if [ -s .${FILE}.keep.3 ]; then mv .${FILE}.keep.3 .${FILE}.keep.4; fi
+ if [ -s .${FILE}.keep.2 ]; then mv .${FILE}.keep.2 .${FILE}.keep.3; fi
+ if [ -s .${FILE}.keep.1 ]; then mv .${FILE}.keep.1 .${FILE}.keep.2; fi
+ if [ -s .${FILE}.keep ]; then mv .${FILE}.keep .${FILE}.keep.1; fi
+ if [ -s ${FILE} ]; then cp -p ${FILE} .${FILE}.keep; fi
+}
+
+for f in $FILES; do
+ if [ -s ${SOURCE}/${f} ]; then
+ echo -n "${f}: keep"
+ keepfile $f
+ echo "# This file generated automatically at `date`" > ${f}
+ echo "#" >> ${f}
+ if [ -s ${f}.sed ]; then
+ echo -n " sed"
+ sed -f ${f}.sed ${SOURCE}/${f} >> ${f}
+ else
+ echo -n " cat"
+ cat ${SOURCE}/${f} >> ${f}
+ fi
+ if [ -s ${f}.sparc ]; then
+ echo -n " sparc"
+ cat ${f}.sparc >> ${f}
+ fi
+ echo " ok"
+ fi
+done