diff options
-rwxr-xr-x | auto/build | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -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() { |