[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnuastro-commits] master 7f70c8c1 4/4: developer-build script: Check th

From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master 7f70c8c1 4/4: developer-build script: Check the existance of the temporary directory
Date: Thu, 2 Jun 2022 12:50:33 -0400 (EDT)

branch: master
commit 7f70c8c15e3c821b5ecb611a5f9a1b3be7a40fff
Author: Raul Infante-Sainz <>
Commit: Mohammad Akhlaghi <>

    developer-build script: Check the existance of the temporary directory
    Until now, the temporary directory was set depending on the operating
    system (macOS or GNU/Linux). However, it may happen that an operating
    system is designed to not have those directories, or an operating system is
    used that we hadn't accounted for!
    With this commit, the assumption on the operative system has been
    removed. Now, the existence of the two possible temporary directories
    ('/dev/shm' and '/tmp') are checked; and they are only used if they
    exist. If none of them exist, then the current directory (.) is considered.
    By default, a folder with the name 'gnuastro-HASH' is generated. So, in
    order to Git ignore this folder, 'gnuastro-*' has been added to
 .gitignore      |  1 +
 developer-build | 32 ++++----------------------------
 2 files changed, 5 insertions(+), 28 deletions(-)

diff --git a/.gitignore b/.gitignore
index ab460f15..8675a849 100644
--- a/.gitignore
+++ b/.gitignore
@@ -102,6 +102,7 @@ install-sh
diff --git a/developer-build b/developer-build
index e8238a77..8162c9d6 100755
--- a/developer-build
+++ b/developer-build
@@ -51,40 +51,16 @@ prefix=/usr/local
-# See if we are on a Linux-based system
-# --------------------------------------
-# Some features are tailored to GNU/Linux systems, while the BSD-based
-# behavior is different. Initially we only tested macOS (hence the name of
-# the variable), but as FreeBSD is also being included in our tests. As
-# more systems get used, we need to tailor these kinds of things better.
-# Here we set the temporary directory.
-kernelname=$(uname -s)
-if [ x$kernelname = xLinux ]; then
+# Check and set the temporary directory
+if [ -d /dev/shm ]; then
-elif [ x$kernelname = xDarwin ]; then
+elif [ -d /tmp ]; then
-    cat <<EOF
-!!!!!!!                 WARNING                !!!!!!!
+    top_build_dir=.
-Gnuastro has been tested on GNU/Linux and Darwin (macOS) systems. But, it
-seems that the current system is not GNU/Linux or Darwin (macOS). If you
-notice any problem during the configure phase, please contact us with this
-The configuration will continue in 10 seconds...
-    sleep 10

reply via email to

[Prev in Thread] Current Thread [Next in Thread]