You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#!/bin/bash
|
|
|
|
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
|
|
|
|
export PATH
|
|
|
|
|
|
|
|
curPath=`pwd`
|
|
|
|
rootPath=$(dirname "$curPath")
|
|
|
|
rootPath=$(dirname "$rootPath")
|
|
|
|
rootPath=$(dirname "$rootPath")
|
|
|
|
rootPath=$(dirname "$rootPath")
|
|
|
|
|
|
|
|
# echo $rootPath
|
|
|
|
|
|
|
|
SERVER_ROOT=$rootPath/lib
|
|
|
|
SOURCE_ROOT=$rootPath/source/lib
|
|
|
|
|
|
|
|
|
|
|
|
VERSION=1.0.18
|
|
|
|
#----------------------------- libsodium start -------------------------#
|
|
|
|
if [ ! -d ${SERVER_ROOT}/libsodium ];then
|
|
|
|
cd ${SOURCE_ROOT}
|
|
|
|
if [ ! -f ${SOURCE_ROOT}/libsodium-${VERSION}-stable.tar.gz ];then
|
|
|
|
# wget --no-check-certificate -O libsodium-1.0.18-stable.tar.gz https://download.libsodium.org/libsodium/releases/libsodium-1.0.18-stable.tar.gz -T 20
|
|
|
|
wget --no-check-certificate -O libsodium-${VERSION}-stable.tar.gz https://download.libsodium.org/libsodium/releases/libsodium-${VERSION}-stable.tar.gz -T 20
|
|
|
|
fi
|
|
|
|
tar -zxvf libsodium-${VERSION}-stable.tar.gz
|
|
|
|
cd libsodium-stable
|
|
|
|
./configure --prefix=${SERVER_ROOT}/libsodium && make && make check && sudo make install
|
|
|
|
fi
|
|
|
|
#----------------------------- libsodium end -------------------------#
|