From e803984455dae78f54624f57b83b9406e99a8d60 Mon Sep 17 00:00:00 2001 From: Rene Vergara Date: Tue, 16 Jul 2024 08:53:42 -0500 Subject: [PATCH] Improve `configure` script --- CHANGELOG.md | 1 + configure | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3432612..20fa1a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Upgraded to GHC 9.6.5 - Implemented config and data folder +- Improved the `configure` script for installation ### Fixed diff --git a/configure b/configure index df9fc8d..25686c1 100755 --- a/configure +++ b/configure @@ -1,6 +1,17 @@ #!/bin/bash - -echo "export PKG_CONFIG_PATH=$HOME/.local/share/zcash-haskell:\$PKG_CONFIG_PATH" | tee -a ~/.bashrc -echo "export LD_LIBRARY_PATH=$HOME/.local/share/zcash-haskell:\$LD_LIBRARY_PATH" | tee -a ~/.bashrc +echo "Configuring Zenith...." +if grep -q "local/share/zcash-haskell" "$HOME/.bashrc"; then + echo "... Paths already exist" +else + # Set Paths + echo "... Adding new zenith paths to local configuration" + echo "export PKG_CONFIG_PATH=$HOME/.local/share/zcash-haskell:\$PKG_CONFIG_PATH" | tee -a ~/.bashrc + echo "export LD_LIBRARY_PATH=$HOME/.local/share/zcash-haskell:\$LD_LIBRARY_PATH" | tee -a ~/.bashrc +fi +echo "... Reloading paths" source ~/.bashrc +echo "... building zcash-haskell" cd zcash-haskell && cabal build +echo +echo "Done" +echo