From 7da00af34d61ed560b05454dc161893d91d58de2 Mon Sep 17 00:00:00 2001 From: Maximilian Reininghaus <maximilian.reininghaus@tu-dortmund.de> Date: Sat, 10 Jun 2023 00:54:53 +0200 Subject: [PATCH] conan-install into optionally specified directory --- conan-install.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/conan-install.sh b/conan-install.sh index 52c9cc860..6f96ceb3c 100755 --- a/conan-install.sh +++ b/conan-install.sh @@ -1,6 +1,15 @@ #! /bin/sh -DIR=$(readlink -f $(dirname $0)) +if [ $# -eq 0 ]; then + # no arguments passed, target is current working dir + DIR=$(readlink -f $(dirname $0)) +elif [ $# -eq 1 ]; then + # target is provided directory + DIR="$1" +else + echo "usage: conan-install.sh [directory]" >&2 + exit 1 +fi echo "using `conan --version`" @@ -11,5 +20,5 @@ if ! conan profile show corsika8 >/dev/null 2>/dev/null; then conan profile update settings.compiler.libcxx=libstdc++11 corsika8 fi fi -# force rebuild of cubicinterpolation (see discussion in MR509) -conan install -pr corsika8 --build=missing ${DIR} + +conan install -pr corsika8 --build=missing "${DIR}" -- GitLab