comparison packaging/linux-installer.inc.in @ 972:8be2f510adbf

(issue91) Make installer architecture aware.
author Andre Heinecke <andre.heinecke@intevation.de>
date Thu, 28 Aug 2014 17:51:22 +0200
parents 15f7b3ebf21b
children f5306f8c02f3
comparison
equal deleted inserted replaced
971:d3258a6faedd 972:8be2f510adbf
18 ICONNAME="###ICONNAME###" 18 ICONNAME="###ICONNAME###"
19 HELPNAMES="###HELPNAMES###" 19 HELPNAMES="###HELPNAMES###"
20 HELPNAMES_SOURCES="###HELPNAMES_SOURCES###" 20 HELPNAMES_SOURCES="###HELPNAMES_SOURCES###"
21 HELPNAMES_STATIC="###HELPNAMES_STATIC###" 21 HELPNAMES_STATIC="###HELPNAMES_STATIC###"
22 HELPNAMES_IMG="###HELPNAMES_IMG###" 22 HELPNAMES_IMG="###HELPNAMES_IMG###"
23 ARCH="###ARCH###"
23 24
24 declare -A instcfg oldinstcfg 25 declare -A instcfg oldinstcfg
25 declare inst_default_prefix instdata_path instcfg_path instcfg_file 26 declare inst_default_prefix instdata_path instcfg_path instcfg_file
26 instcfg=( 27 instcfg=(
27 [TIMESTMP]=`date -u +%Y%m%d%H%M%S` 28 [TIMESTMP]=`date -u +%Y%m%d%H%M%S`
175 autostart_path=${XDG_CONFIG_HOME:-~/.config/autostart} 176 autostart_path=${XDG_CONFIG_HOME:-~/.config/autostart}
176 startmenu_path=${XDG_DATA_HOME:-~/.local/share/applications} 177 startmenu_path=${XDG_DATA_HOME:-~/.local/share/applications}
177 fi 178 fi
178 instcfg_file="${instcfg_path}/${INSTCFGNAME}" 179 instcfg_file="${instcfg_path}/${INSTCFGNAME}"
179 extra_bin_path=`mktemp --tmpdir -d tmpbin.XXXXXXXXXX` 180 extra_bin_path=`mktemp --tmpdir -d tmpbin.XXXXXXXXXX`
181 HOST_ARCH=$(uname -m)
180 } 182 }
181 183
182 cleanup() 184 cleanup()
183 { 185 {
184 getxt "Cleaning up temporary stuff ...\n" 186 getxt "Cleaning up temporary stuff ...\n"
499 501
500 cat <<EOF 502 cat <<EOF
501 ------------------------------------------------------------------------ 503 ------------------------------------------------------------------------
502 504
503 TrustBridge - Installer 505 TrustBridge - Installer
504 Version ${instcfg[VERSION]} (Testversion) 506 Version ${instcfg[VERSION]} - ${ARCH} (Testversion)
505 507
506 ------------------------------------------------------------------------ 508 ------------------------------------------------------------------------
507 EOF 509 EOF
510
511 if [ "$ARCH" == "x86_64" -a "$ARCH" != "$HOST_ARCH" ]; then
512 getxt "It appears your system architecture is %s.\n" "$HOST_ARCH"
513 getxt "This installer is for 64 bit systems.\n"
514 getxt "Really install TrustBridge for '%s' systems? [y/n]\n" "${ARCH}"
515 yorn || exit 0
516 fi
517
518 if [ "$ARCH" == "i386" ]; then
519 if [[ "$HOST_ARCH" != *86 ]]; then
520 getxt "It appears your system architecture is %s.\n" "$HOST_ARCH"
521 getxt "This installer is for 32 bit systems.\n"
522 getxt "Really install TrustBridge for '%s' systems? [y/n]\n" "${ARCH}"
523 yorn || exit 0
524 fi
525 fi
508 526
509 if [ $DEINSTALL -eq 1 ] ; then 527 if [ $DEINSTALL -eq 1 ] ; then
510 deinstall 528 deinstall
511 # Stop after deinstallation: 529 # Stop after deinstallation:
512 exit 0 530 exit 0

http://wald.intevation.org/projects/trustbridge/