Browse Source

Merge pull request #95 from kaneawk/patch-1

openssl: Openssl path bug fixes
lj2007331 7 years ago
parent
commit
1847a8713f
1 changed files with 3 additions and 0 deletions
  1. 3 0
      include/openssl.sh

+ 3 - 0
include/openssl.sh

@@ -17,6 +17,9 @@ Install_openSSL102() {
     make clean
     ./config --prefix=${openssl_install_dir} -fPIC shared zlib-dynamic
     make -j ${THREAD} && make install
+    [ -z "`grep ^'export PATH=' /etc/profile`" ] && echo "export PATH=${openssl_install_dir}/bin:\$PATH" >> /etc/profile
+    [ -n "`grep ^'export PATH=' /etc/profile`" -a -z "`grep ${openssl_install_dir} /etc/profile`" ] && sed -i "s@^export PATH=\(.*\)@export PATH=${openssl_install_dir}/bin:\1@" /etc/profile
+    . /etc/profile
     popd
     if [ -f "${openssl_install_dir}/lib/libcrypto.a" ]; then
       echo "${CSUCCESS}openssl-1.0.2 module installed successfully! ${CEND}"