]> foleosoft.com Git - CryptoFoleo.git/commitdiff
Tue Jan 21 01:57:55 PM EST 2025
authorserver <[email protected]>
Tue, 21 Jan 2025 18:57:55 +0000 (13:57 -0500)
committerserver <[email protected]>
Tue, 21 Jan 2025 18:57:55 +0000 (13:57 -0500)
build.sh

index 2af4920961bf58293476c3c72fff6c448d53bd89..a363dc0aa0785d86cb65c3519629d3ce723d8a63 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -14,33 +14,13 @@ then
        set -x -e
        sudo cp bin/CryptoFoleo.h /usr/local/include/
        sudo cp bin/libCryptoFoleo.so /usr/local/lib/
-       set +e
-       cat /etc/profile | grep LD_LIBRARY_PATH | grep usr/local/lib
-       err=$?
-       set -e
-       if [ $err -eq 1 ]
-       then
-               cat /etc/profile > .tmp
-               echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib' >> .tmp
-               mv .tmp /etc/profile
-       fi
+       export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
+       sudo ldconfig
 elif [ "$1" == "uninstall" ]
 then
        set -x -e
        sudo rm /usr/local/include/CryptoFoleo.h /usr/local/lib/libCryptoFoleo.so
-       set +e
-       cat /etc/profile | grep 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib'
-       err=$?
-       set -e
-       if [ $err -eq 0 ]
-       then
-               read -p "Do you want to remove /usr/local/lib from /etc/profile? (y/n): " y
-               if [ "$y" = "y" ] || [ "$y" = "Y" ]
-               then
-                       cat /etc/profile | grep -v 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib' > .tmp
-                       mv .tmp /etc/profile
-               fi
-       fi
+       sudo ldconfig
 else
        set -x -e
        gcc -shared -fPIC src/all.c -o bin/libCryptoFoleo.so -lgmp -DDEVICE='"/dev/random"'