#! /bin/bash

if [[ $(uname -m) == "x86_64" ]]
then
    wget --backups=0 "https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1604-3.2.7.tgz"
    tar -zxf ./mongodb-linux-x86_64-ubuntu1604-3.2.7.tgz --strip-components=1
else
    IFS=" " read -a links <<< $(apt-get -y --print-uris install mongodb | egrep -o "https?://[^']+")
    for link in ${links[@]}
    do
        wget --backups=0 ${link}
    done

    IFS=" " read -a deb_pkgs <<< $(ls ./ | egrep -o "mongo.+\.deb")
    for pkg in ${deb_pkgs[@]}
    do
        dpkg-deb -R ${pkg} ./
    done
fi


#! /bin/bash

if [[ $(uname -m) == "x86_64" ]]
then
    wget --backups=0 "https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1604-3.2.7.tgz"
    tar -zxf ./mongodb-linux-x86_64-ubuntu1604-3.2.7.tgz --strip-components=1
else
    IFS=" " read -a links <<< $(apt-get -y --print-uris install mongodb | egrep -o "https?://[^']+")
    for link in ${links[@]}
    do
        wget --backups=0 ${link}
    done

    IFS=" " read -a deb_pkgs <<< $(ls ./ | egrep "\.deb")
    for pkg in ${deb_pkgs[@]}
    do
        echo "Extracting ${pkg}..."
        dpkg-deb -R ${pkg} ./
    done
fi


Fix missing library issue on i386/armhf
Fix missing library issue on i386/armhf