gnuastro-commits
[Top][All Lists]
Advanced

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

[gnuastro-commits] master fcf00960 37/39: astscript-zeropoint: Content o


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master fcf00960 37/39: astscript-zeropoint: Content of temorary file have been removed
Date: Wed, 19 Apr 2023 12:18:28 -0400 (EDT)

branch: master
commit fcf009602886b9e97f9f5626b1e8dfdad191eb82
Author: Sepideh Eskandarlou <sepideh.eskandarlou@gmail.com>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>

    astscript-zeropoint: Content of temorary file have been removed
    
    Until now, the content of the temporary directory were not considered and
    if the user changed a parameter the final result did not change. Because
    zero point value obtained in the make file and all the prerequiesit were in
    temporary directory and due to this make did not build them again.
    Although, in the mannual of the zeropoitn some commands did not start with
    '$' sign.
    
    With this commit, first of all in the script the all the contents of the
    temporary directory will be removed and all files will created newly.  On
    the other hand, in zero point mannual all the mannual beginig with '$'
    sign.
---
 bin/script/zeropoint.in | 10 ++++++++--
 doc/gnuastro.texi       |  4 ++--
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/bin/script/zeropoint.in b/bin/script/zeropoint.in
index 6730ffcc..7a0c5847 100644
--- a/bin/script/zeropoint.in
+++ b/bin/script/zeropoint.in
@@ -393,10 +393,16 @@ if [ x"$tmpdir" = x ]; then \
   tmpdir=$(pwd)/"$basename"_zeropoint
 fi
 
+# This script will be run in a Makefile. In Make if the all the
+# prerequiesits are exist the Make do not build the prerequiesit in second
+# run. But we do not want it in Gnuastro, because sometimes user change a
+# option and she/he wants to check the final result but the final output do
+# not want to change because all the prerequiesit exist. Due to this at
+# first we will remove temeporary directory.
 if [ -d "$tmpdir" ]; then
-  junk=1
+    rm "$tmpdir"/*
 else
-  mkdir -p "$tmpdir"
+    mkdir "$tmpdir"
 fi
 
 # Default output catalog file
diff --git a/doc/gnuastro.texi b/doc/gnuastro.texi
index 367fd2e7..af11a56e 100644
--- a/doc/gnuastro.texi
+++ b/doc/gnuastro.texi
@@ -29719,7 +29719,7 @@ $ astfits zp/jplus-zeropoint.fits
 Let's have a look at each extension with Gnuastro's @command{asttable} program:
 
 @example
-asttable zp/jplus-zeropoint.fits --hdu=1 -i
+$ asttable zp/jplus-zeropoint.fits --hdu=1 -i
 --------
 zp/jplus-zeropoint.fits (hdu: 1)
 -------       -----   ----     -------
@@ -29732,7 +29732,7 @@ No.Name       Units   Type     Comment
 Number of rows: 1
 --------
 
-asttable zp/jplus-zeropoint.fits --hdu=2 -i
+$ asttable zp/jplus-zeropoint.fits --hdu=2 -i
 --------
 zp/jplus-zeropoint.fits (hdu: 2)
 -------      -----  ----     -------



reply via email to

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