2022-06-27 11:46:13 +02:00
|
|
|
# Copyright 2022, FOSS-VG Developers and Contributers
|
|
|
|
#
|
|
|
|
# This program is free software: you can redistribute it and/or modify it
|
|
|
|
# under the terms of the GNU Affero General Public License as published
|
|
|
|
# by the Free Software Foundation, version 3.
|
|
|
|
#
|
|
|
|
# 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 Affero General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU Affero General Public License
|
|
|
|
# version 3 along with this program.
|
|
|
|
# If not, see https://www.gnu.org/licenses/agpl-3.0.en.html
|
|
|
|
|
2022-06-27 11:47:36 +02:00
|
|
|
echo -n "Loading shell environment for FOSS-VG development... "
|
|
|
|
|
2022-06-27 07:35:04 +02:00
|
|
|
PROJECT_BASE_DIR="$( cd -- "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 ; pwd -P )"
|
|
|
|
|
2022-06-27 07:57:57 +02:00
|
|
|
alias clean="pushd \"$PROJECT_BASE_DIR\" >/dev/null 2>&1; scripts/clean.sh; popd >/dev/null 2>&1"
|
|
|
|
alias clean_dependencies="pushd \"$PROJECT_BASE_DIR\" >/dev/null 2>&1; scripts/clean_dependencies.sh; popd >/dev/null 2>&1"
|
|
|
|
alias setup_project="pushd \"$PROJECT_BASE_DIR\" >/dev/null 2>&1; scripts/setup_project.sh; popd >/dev/null 2>&1"
|
2022-06-28 22:03:27 +02:00
|
|
|
|
|
|
|
function run_tests {
|
|
|
|
pushd "$PROJECT_BASE_DIR" >/dev/null 2>&1
|
|
|
|
scripts/test.sh
|
|
|
|
popd >/dev/null 2>&1
|
|
|
|
}
|
2022-06-27 07:35:04 +02:00
|
|
|
|
2022-06-27 09:01:52 +02:00
|
|
|
function build {
|
|
|
|
pushd "$PROJECT_BASE_DIR" >/dev/null 2>&1
|
|
|
|
CXX="$CXX" CXXFLAGS="$CXXFLAGS" scripts/build.sh
|
|
|
|
popd >/dev/null 2>&1
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2022-06-27 07:35:04 +02:00
|
|
|
if [ -z "$LD_LIBRARY_PATH" ]; then
|
|
|
|
export LD_LIBRARY_PATH="$PROJECT_BASE_DIR"/bin/lib
|
|
|
|
else
|
2022-06-28 18:06:24 +02:00
|
|
|
export LD_LIBRARY_PATH="$PROJECT_BASE_DIR"/bin/lib:"$LD_LIBRARY_PATH"
|
2022-06-27 07:35:04 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
unset PROJECT_BASE_DIR
|
2022-06-27 11:47:36 +02:00
|
|
|
|
|
|
|
echo "done."
|