"Fossies" - the Fresh Open Source Software Archive

Member "gnuastro-0.9/tests/table/txt-to-fits-binary.sh" (11 Apr 2019, 1670 Bytes) of package /linux/privat/gnuastro-0.9.tar.lz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "txt-to-fits-binary.sh": 0.8_vs_0.9.

    1 # Convert an ASCII table to a binary table
    2 #
    3 # See the Tests subsection of the manual for a complete explanation
    4 # (in the Installing gnuastro section).
    5 #
    6 # Original author:
    7 #     Mohammad Akhlaghi <mohammad@akhlaghi.org>
    8 # Contributing author(s):
    9 # Copyright (C) 2015-2019 Free Software Foundation, Inc.
   10 #
   11 # Copying and distribution of this file, with or without modification,
   12 # are permitted in any medium without royalty provided the copyright
   13 # notice and this notice are preserved.  This file is offered as-is,
   14 # without any warranty.
   15 
   16 
   17 
   18 
   19 
   20 # Preliminaries
   21 # =============
   22 #
   23 # Set the variables (The executable is in the build tree). Do the
   24 # basic checks to see if the executable is made or if the defaults
   25 # file exists (basicchecks.sh is in the source tree).
   26 prog=table
   27 execname=../bin/$prog/ast$prog
   28 table=$topsrc/tests/$prog/table.txt
   29 
   30 
   31 
   32 
   33 
   34 # Skip?
   35 # =====
   36 #
   37 # If the dependencies of the test don't exist, then skip it. There are two
   38 # types of dependencies:
   39 #
   40 #   - The executable was not made (for example due to a configure option),
   41 #
   42 #   - The input data was not made (for example the test that created the
   43 #     data file failed).
   44 if [ ! -f $execname ]; then echo "$execname not created."; exit 77; fi
   45 if [ ! -f $table    ]; then echo "$table does not exist."; exit 77; fi
   46 
   47 
   48 
   49 
   50 
   51 # Actual test script
   52 # ==================
   53 #
   54 # `check_with_program' can be something like `Valgrind' or an empty
   55 # string. Such programs will execute the command if present and help in
   56 # debugging when the developer doesn't have access to the user's system.
   57 $check_with_program $execname $table --output=binary-table.fits \
   58                               --tableformat=fits-binary