[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."
- [gnuastro-commits] master updated (3a84a97 -> 6770ac8), Mohammad Akhlaghi, 2016/08/04
- [gnuastro-commits] master 1ff3999 2/7: Minor corrections in parallel-build-in-tmpfs, Mohammad Akhlaghi, 2016/08/04
- [gnuastro-commits] master 6d2a3a0 1/7: Script to configure and build in tmpfs, Mohammad Akhlaghi, 2016/08/04
- [gnuastro-commits] master 2de6a04 3/7: Make a symbolic link to access the tmpfs build, Mohammad Akhlaghi, 2016/08/04
- [gnuastro-commits] master abcc408 5/7: Removed argument on speed in parallel-build-in-tmpfs, Mohammad Akhlaghi, 2016/08/04
- [gnuastro-commits] master 18986ab 6/7: Tmpfs build script included in the distribution tarball, Mohammad Akhlaghi, 2016/08/04
- [gnuastro-commits] master 620aaee 4/7: Fix creation of build directory when building in RAM,
Mohammad Akhlaghi <=
- [gnuastro-commits] master 6770ac8 7/7: Merged tmpfs build script branch, Mohammad Akhlaghi, 2016/08/04