[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-commits] master 6f75782: Tmpfs build directory name based on s
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-commits] master 6f75782: Tmpfs build directory name based on source dir name |
Date: |
Fri, 5 Aug 2016 00:05:09 +0000 (UTC) |
branch: master
commit 6f757826e7b33b1f2e2b82af2e845ac855f82c17
Author: Mohammad Akhlaghi <address@hidden>
Commit: Mohammad Akhlaghi <address@hidden>
Tmpfs build directory name based on source dir name
In the script to configure and build Gnuastro in tmpfs, the name of the
temporary directory was 'gnuastro-XXXX'. This was contrary to the claim in
the comments that this file can be used in any program using the GNU Build
System. So now it uses 'basename' to find the name of the source directory
and use that to set the directory name in tmpfs.
With this system, when the script is run within a tarball, the temporary
directory will have two version numbers, maybe later we can work on
removing one of them. But for now this is sufficient, in practice a user
will hardly ever want to directly go to that directory, they will go
through the 'build' symbolic link and after a restart its gone with the
rest of the RAM.
When merging this commit with master, I forgot to include a notice that
this task is now complete. So it is being included here:
This finishes task #14100.
---
tmpfs-config-make | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/tmpfs-config-make b/tmpfs-config-make
index bb2153f..4e5cf14 100755
--- a/tmpfs-config-make
+++ b/tmpfs-config-make
@@ -90,13 +90,19 @@ if [ ! -d $TMPDIR ]; then
fi
+# Keep the address of this source directory (where this script is being run
+# from) which we will need later.
+srcdir=$(pwd)
+
+
# Set the build directory name in tmpfs. If the .version file exists, use
# it to allow multiple version builds there (which might happen during
# development).
+basedir=$(basename -- "$srcdir")
if [ -f .version ]; then
- build_dir=$TMPDIR/gnuastro-$(cat .version)
+ build_dir=$TMPDIR/"$basedir"-$(cat .version)
else
- build_dir=$TMPDIR/gnuastro
+ build_dir=$TMPDIR/"$basedir"
fi
@@ -128,9 +134,7 @@ else
fi
-# Keep the address of this source directory and go into the build directory
-# to start the configure and/or build:
-srcdir=$(pwd)
+# Go into the build directory to start the configure and/or build:
cd $build_dir
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnuastro-commits] master 6f75782: Tmpfs build directory name based on source dir name,
Mohammad Akhlaghi <=