gnuastro-commits
[Top][All Lists]
Advanced

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

[gnuastro-commits] master 620aaee 4/7: Fix creation of build directory w


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master 620aaee 4/7: Fix creation of build directory when building in RAM
Date: Thu, 4 Aug 2016 23:21:06 +0000 (UTC)

branch: master
commit 620aaeef1b19da6c89e9a3924c9d4349b12af4a0
Author: Mosè Giordano <address@hidden>
Commit: Mosè Giordano <address@hidden>

    Fix creation of build directory when building in RAM
    
    The previous test just tested if the target directory was a symbolic
    link, with the result that if the directory didn’t exist at all the
    script exited.  Now we first check if the target is a symbolic link,
    delete it, and then test if the target exists.
---
 parallel-build-in-tmpfs |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/parallel-build-in-tmpfs b/parallel-build-in-tmpfs
index 2046879..08935f9 100755
--- a/parallel-build-in-tmpfs
+++ b/parallel-build-in-tmpfs
@@ -101,7 +101,12 @@ fi
 # pre-existing symbolic link.
 build_sym=build
 if [ -h $build_sym ]; then
+    # Delete a harmless symbolic link, if present.
     rm $build_sym
+fi
+
+if [ ! -e $build_sym ]; then
+    # Create the link only if the target doesn't exist.
     ln -s $build_dir $build_sym
 else
     echo "$build_sym already exists here and is not a symbolic link."



reply via email to

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