Add multiarch support.

This commit is contained in:
ernierasta 2013-10-23 13:13:17 +02:00
parent 9058643302
commit c437fa0e3c
1 changed files with 11 additions and 2 deletions

13
apt-cyg
View File

@ -100,18 +100,27 @@ function findworkspace()
function getsetup() function getsetup()
{ {
ARCH=`uname -m | grep _64`
if test "-$ARCH-" = "--"
then
arch="x86"
else
arch="x86_64"
fi
if test "$noscripts" == "0" -a "$noupdate" == "0" if test "$noscripts" == "0" -a "$noupdate" == "0"
then then
touch setup.ini touch setup.ini
mv setup.ini setup.ini-save mv setup.ini setup.ini-save
wget -N $mirror/setup.bz2 wget -N $mirror/$arch/setup.bz2
if test -e setup.bz2 && test $? -eq 0 if test -e setup.bz2 && test $? -eq 0
then then
bunzip2 setup.bz2 bunzip2 setup.bz2
mv setup setup.ini mv setup setup.ini
echo Updated setup.ini echo Updated setup.ini
else else
wget -N $mirror/setup.ini wget -N $mirror/$arch/setup.ini
if test -e setup.ini && test $? -eq 0 if test -e setup.ini && test $? -eq 0
then then
echo Updated setup.ini echo Updated setup.ini