diff --git a/conan-install.sh b/conan-install.sh
index 52c9cc860c43231820be481c4ba9d3ba3a9c940c..6f96ceb3c822386ea78d0f6da35d4130f0d54b5b 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}"