From fabc53c780b4b8fb74221a79c971f22d4a233cc0 Mon Sep 17 00:00:00 2001
From: lukken <lukken@astron.nl>
Date: Tue, 26 Oct 2021 08:58:32 +0000
Subject: [PATCH] L2SS-287: Use better temporary directory for start-ds.sh

---
 bin/start-ds.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/bin/start-ds.sh b/bin/start-ds.sh
index a64022016..e7fab7e93 100755
--- a/bin/start-ds.sh
+++ b/bin/start-ds.sh
@@ -22,9 +22,10 @@ if [[ $TANGOSTATIONCONTROL ]]; then
 else
   # Install the package, exit 1 if it fails
   cd tangostationcontrol || exit 1
-  python3 setup.py build --build-base /tmp/ egg_info --egg-base /tmp/ bdist_wheel --dist-dir /tmp/ || exit 1
+  mkdir -p /tmp/tangostationcontrol
+  python3 setup.py build --build-base /tmp/tangostationcontrol egg_info --egg-base /tmp/tangostationcontrol bdist_wheel --dist-dir /tmp/tangostationcontrol || exit 1
   # shellcheck disable=SC2012
-  sudo pip install "$(ls -Art /tmp/*.whl | tail -n 1)"
+  sudo pip install "$(ls -Art /tmp/tangostationcontrol/*.whl | tail -n 1)"
 fi
 
 /usr/local/bin/wait-for-it.sh "$TANGO_HOST" --timeout=30 --strict -- "$@"
-- 
GitLab