"Fossies" - the Fresh Open Source Software Archive

Member "gnuastro-0.8/tests/fits/write.sh" (18 Jul 2018, 1818 Bytes) of package /linux/privat/gnuastro-0.8.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 last Fossies "Diffs" side-by-side code changes report for "write.sh": 0.6_vs_0.7.

    1 # Write a junk header to a FITS file
    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 #
   10 # Copying and distribution of this file, with or without modification,
   11 # are permitted in any medium without royalty provided the copyright
   12 # notice and this notice are preserved.  This file is offered as-is,
   13 # without any warranty.
   14 
   15 
   16 
   17 
   18 
   19 # Preliminaries
   20 # =============
   21 #
   22 # Set the variables (The executable is in the build tree). Do the
   23 # basic checks to see if the executable is made or if the defaults
   24 # file exists (basicchecks.sh is in the source tree).
   25 prog=fits
   26 img=mkprofcat1.fits
   27 execname=../bin/$prog/ast$prog
   28 
   29 
   30 
   31 
   32 
   33 # Skip?
   34 # =====
   35 #
   36 # If the dependencies of the test don't exist, then skip it. There are two
   37 # types of dependencies:
   38 #
   39 #   - The executable was not made (for example due to a configure option),
   40 #
   41 #   - The input data was not made (for example the test that created the
   42 #     data file failed).
   43 if [ ! -f $execname ]; then echo "$execname not created."; exit 77; fi
   44 if [ ! -f $img      ]; then echo "$img does not exist.";   exit 77; fi
   45 
   46 
   47 
   48 
   49 
   50 # Actual test script
   51 # ==================
   52 #
   53 # `check_with_program' can be something like `Valgrind' or an empty
   54 # string. Such programs will execute the command if present and help in
   55 # debugging when the developer doesn't have access to the user's system.
   56 cp $img fitstest.fits
   57 $check_with_program $execname fitstest.fits                                    \
   58                               --write=ABSJUNK,10.92,"A Fits keyword Test.",m/s \
   59                               --date                                           \
   60                               --write=ABSJNK2,2343fdsa,"Another absolute junk test!"