From 9be55f5d7dce4f34bc14b417b9cb4201246986ff Mon Sep 17 00:00:00 2001 From: "James E.H. Turner" Date: Tue, 23 Aug 2016 20:08:38 -0300 Subject: Move iraf package filename definitions into their own file, for use by multiple sh scripts. Also quote a few path variables properly, in case of spaces. --- scripts/check_iraf_pkg_build | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'scripts/check_iraf_pkg_build') diff --git a/scripts/check_iraf_pkg_build b/scripts/check_iraf_pkg_build index 58619bf..e33190f 100755 --- a/scripts/check_iraf_pkg_build +++ b/scripts/check_iraf_pkg_build @@ -11,13 +11,11 @@ # 4 build incomplete with respect to manifest # 6 both of the above -log_name="build_log" -err_log_name="build_log.errors" -manifest_name="ur_manifest" -pkg_patt_name="ur_mkpkg_patterns" - usage="Usage: check_iraf_pkg_build PATH" +# Source some common IRAF package defs (log_name etc.) from the same dir: +. `dirname "$0"`/iraf_defs + # Parse argument(s): st=1 unset pkg_path @@ -47,7 +45,7 @@ if [ $st != 0 -o -z "$pkg_path" ]; then fi # Add a trailing slash if needed (as per IRAF custom): -pkg_path=`echo $pkg_path | sed -e 's|/*$|/|'` +pkg_path=`echo "$pkg_path" | sed -e 's|/*$|/|'` # Make sure the specified path is readable: if [ ! -d "$pkg_path" -o ! -r "$pkg_path" ]; then -- cgit