summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Loibl <andreas@andreas-loibl.de>2012-02-29 20:33:05 +0100
committerAndreas Loibl <andreas@andreas-loibl.de>2012-02-29 20:33:05 +0100
commitf6c5c447f15b2fb3ae30a42f520c2129cccd9e34 (patch)
treea540611a069f1eabefc6095d4f9293b9f49b2cbc
parent419935a01140e97ffcb6c8bef638c16b6dccc127 (diff)
downloadkanotix-f6c5c447f15b2fb3ae30a42f520c2129cccd9e34.zip
kanotix-f6c5c447f15b2fb3ae30a42f520c2129cccd9e34.tar.gz
updated codename handling
-rwxr-xr-xauto/build11
1 files changed, 9 insertions, 2 deletions
diff --git a/auto/build b/auto/build
index c97fb9c..22c5d19 100755
--- a/auto/build
+++ b/auto/build
@@ -10,9 +10,16 @@ LABEL=Kanotix
export LB_BOOTLOADER
# Update kanotix-version (32/64-bit and timestamp)
+declare -A KANOTIX_CODENAME
+KANOTIX_CODENAMES[lenny]=Excalibur;
+KANOTIX_CODENAMES[squeeze]=Hellfire;
+KANOTIX_CODENAMES[wheezy]=Dragonfire;
+KANOTIX_CODENAME=${KANOTIX_CODENAMES[$LB_DISTRIBUTION]}
+
mkdir -p config/chroot_local-includes/etc
-[ ! -f config/chroot_local-includes/etc/kanotix-version ] && echo "Kanotix Dragonfire 0000-00:00" > config/chroot_local-includes/etc/kanotix-version
-perl -pi -e "s%(Kanotix|Excalibur|Hellfire|Dragonfire)(32|64)%\${1}$bit%i; s%(32|64)(bit)%$bit\${2}%i; s|[0-9]+-[0-9]+:[0-9]+|$(date +%Y%m%d-%H:%M)|" config/chroot_local-includes/etc/kanotix-version
+[ ! -f config/chroot_local-includes/etc/kanotix-version ] && echo Kanotix $KANOTIX_CODENAME 0000-00:00 > config/chroot_local-includes/etc/kanotix-version
+[ "$KANOTIX_CODENAME" ] && perl -pi -e "s%($(echo ${KANOTIX_CODENAMES[@]}|tr ' ' '|'))%$KANOTIX_CODENAME%i; s%(Kanotix|$KANOTIX_CODENAME)(32|64)%\${1}$bit%i" config/chroot_local-includes/etc/kanotix-version
+perl -pi -e "s%(32|64)(bit)%$bit\${2}%i; s|[0-9]+-[0-9]+:[0-9]+|$(date +%Y%m%d-%H:%M)|" config/chroot_local-includes/etc/kanotix-version
prebuild()
{