[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-commits] master a14fae00 2/2: developer-build: fixed silent ex
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-commits] master a14fae00 2/2: developer-build: fixed silent exits due to typos |
Date: |
Thu, 2 May 2024 14:37:39 -0400 (EDT) |
branch: master
commit a14fae00882a8682471d7fdf37777dbd953e3f33
Author: Giacomo Lorenzetti <glorenzetti@cefca.es>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>
developer-build: fixed silent exits due to typos
Until now, due to a typo (forgetting the '$' sign behind variable names),
the script ended silently in case of a lack of parameters given to
'--top-build-dir', '--jobs' and '--compression'.
With this commit, the typos have been corrected and the user is notified
with an error message if they are given an empty value.
This fixes bug #65672
---
NEWS | 3 +++
developer-build | 8 ++++++--
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/NEWS b/NEWS
index 467e73f6..bdd7f864 100644
--- a/NEWS
+++ b/NEWS
@@ -169,6 +169,9 @@ See the end of the file for license conditions.
requested. Reported by Raul Infante-Sainz and fixed by Giacomo
Lorenzetti.
+ - bug #65672: ./developer-build exits silently when some options are
+ given an empty value. Found and fixed by Giacomo Lorenzetti.
+
- bug #65673: Arithmetic creates a metadata FITS file a HDU with no data)
even when the output is not FITS (plain-text or on the standard
output). Reported by Sepideh Eskandarlou.
diff --git a/developer-build b/developer-build
index c2771a50..e954bd4d 100755
--- a/developer-build
+++ b/developer-build
@@ -258,7 +258,7 @@ do
;;
-b|--top-build-dir)
top_build_dir="$2"
- if [ x"top_build_dir" = x ]; then
+ if [ x"$top_build_dir" = x ]; then
echo "No argument given to '--top-build-dir' ('-b')."
exit 1;
fi
@@ -287,7 +287,7 @@ do
;;
-j|--jobs)
jobs="$2"
- if [ x"jobs" = x ]; then
+ if [ x"$jobs" = x ]; then
echo "No argument given to '--jobs' ('-j')."
exit 1;
fi
@@ -308,6 +308,10 @@ do
;;
-z|--compression)
compression="$2"
+ if [ x"$compression" = x ]; then
+ echo "No argument given to '--compression' ('-z')."
+ exit 1;
+ fi
shift # past argument
shift # past value
;;