Skip to content
Snippets Groups Projects
Commit 9339c878 authored by Anders Lindh Olsson's avatar Anders Lindh Olsson 🎱
Browse files

remove legacy rebuild.sh

parent 0e991ee4
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
#
# Copyright (c) 2017 - Present European Spallation Source ERIC
#
# The dm_setup.bash is free software: you can redistribute
# it and/or modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 2 of the
# License, or any newer version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see https://www.gnu.org/licenses/gpl-2.0.txt
#
# Author : Jeong Han Lee
# email : han.lee@esss.se
# Date :
# Version : 0.0.2
declare -gr SCRIPT="$(realpath "$0")"
declare -gr TOP="$(dirname "$SCRIPT")"
declare -g PROJECT=""
function pushd() { builtin pushd "$@" > /dev/null; }
function popd() { builtin popd "$@" > /dev/null; }
make_file_name="Makefile"
# make_file_name="GNUmakefile"
eval $(cat ${TOP}/Makefile | grep -E "^(PROJECT)=")
if [ -z "${PROJECT}" ]
then
echo "PROJECT is empty or "
echo "PROJECT should have no splace e.g. PROJECT=project_name"
echo "Please check ${make_file_name} in ${TOP}"
exit;
fi
printf "You are re-building %s ? \n" "${PROJECT}"
read -p "Do you want to continue (y/n)? " answer
case ${answer:0:1} in
y|Y )
printf "Yes, we are removing ...... \n";
sudo rm -rfv ${EPICS_MODULES_PATH}/${PROJECT}
;;
* )
printf "Stop here.\n";
exit;
;;
esac
printf "We will install the new version of %s\n" "${PROJECT}"
pushd ${TOP}
sudo -E make install
popd
exit
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment