#!/bin/sh if ! [ $(id -u) = 0 ]; then printf "%s\n" "You need to be root" exit 1 fi # OpenSSL cd /opt wget -O openssl.tar.gz https://www.openssl.org/source/openssl-1.0.2t.tar.gz tar -xzf openssl.tar.gz && \ ln -s /opt/openssl-1.0.2t /opt/openssl-1.0 cd /opt/openssl-1.0 ./config shared --prefix=/usr/local/openssl-1.0 --openssldir=/usr/local/openssl-1.0 && \ make -j`nproc` && make install || { >&2 printf "%s" "Fail to compile" && exit 1; } # cURL cd /opt wget -O curl.tar.gz https://curl.haxx.se/download/curl-7.67.0.tar.gz tar -xzf curl.tar.gz && chown -R root:root curl-7.67.0 ln -s /opt/curl-7.67.0 /opt/curl cd /opt/curl ./configure --with-ssl=/usr/local/openssl-1.0 --prefix=/usr/local/curl-with-openssl-1.0 && \ make -j`nproc` && make install || { >&2 printf "%s" "Fail to compile" && exit 1; } printf "%s\n" "Done building :)"