From 220253f5fd8d9ea43a001b038bd4c603e3df95be Mon Sep 17 00:00:00 2001 From: mlietzow Date: Tue, 23 Jan 2024 08:12:04 +0100 Subject: [PATCH] removed option to delete polaris installation --- compile.sh | 46 +--------------------------------------------- 1 file changed, 1 insertion(+), 45 deletions(-) diff --git a/compile.sh b/compile.sh index aef91a04..278a9439 100755 --- a/compile.sh +++ b/compile.sh @@ -304,46 +304,6 @@ function update_installation() } -# ================================================================================ # -# ================================ Delete POLARIS ================================ # -# ================================================================================ # - - -function delete_installation() -{ - printf "%s\n" "Do you really want to delete your POLARIS installation [y/N]?" - read really_delete - case ${really_delete:=n} in - [yY]*) - echo "------ delete POLARIS ------" - - export_str="export POLARIS_PATH=\"${current_path}\"" - if grep -q "${export_str}" ${HOME}/.bashrc; then - sed -i.bak "/${export_str//\//\\/}/,+4d" ${HOME}/.bashrc - fi - - export_str="export POLARIS_FITS_PATH=\""'${POLARIS_PATH}'"/lib/CCfits/build:"'${POLARIS_PATH}'"/lib/cfitsio/build\"" - if grep -q "${export_str}" ${HOME}/.bashrc; then - sed -i.bak "/${export_str//\//\\/}/,+4d" ${HOME}/.bashrc - fi - - export_str="export POLARISTOOLS_PATH=\"$HOME/.local/bin\"" - if grep -q "${export_str}" ${HOME}/.bashrc; then - sed -i.bak "/${export_str//\//\\/}/,+4d" ${HOME}/.bashrc - fi - - cd ${current_path}/../ - rm -rfv ${current_path} - pip3 uninstall PolarisTools - exit - ;; - *) - exit - ;; - esac -} - - # ================================================================================ # # =========================== Get user input and verify ========================== # # ================================================================================ # @@ -351,7 +311,7 @@ function delete_installation() function usage() { echo "" - echo "usage: compile.sh [-h] [-frdu] [-c CXX_COMPILER] [-g CMAKE_GENERATOR] [-D]" + echo "usage: compile.sh [-h] [-frdu] [-c CXX_COMPILER] [-g CMAKE_GENERATOR]" echo "" echo "Install and compile POLARIS" echo -e "${YELLOW}HINT:${NC} For first installation, use option -f" @@ -371,7 +331,6 @@ function usage() { echo " choose the generator for cmake:" echo " - make (default)" echo " - ninja" - echo "-D delete POLARIS from your computer" echo "" exit } @@ -415,9 +374,6 @@ while getopts "hfrduc:g:D" opt; do CMAKE_GENERATOR="Unix Makefiles" fi ;; - D) - delete_installation - ;; *) usage ;;