#! /bin/bash
# Last edited on 2021-11-25 22:21:43 by stolfi

# Creates a ".tgz" (tar-gzip) file with the good modules of the HoPath
# project, J. Stolfi's version.

today=`yyyy-mm-dd-hhmmss`
echo ${today} 1>&2

zfile="${today}-hotfill-all-js.tgz"

cat 00-MODULES.txt \
  | egrep -e '^[+XI?]' \
  | gawk \
    ' /^[X?]/ { printf "!! module %s with errors, skipped\n", $2 > "/dev/stderr" ; next }
      // {
        printf "%s.py\n", $2
        printf "%s_IMP.py\n", $2
        printf "tests/%s_TST.py\n", $2
        next
      }
    ' \
  > .mods

tar -cvhzf ${zfile} \
  00-README \
  tests/00-README \
  tests/out/00-README \
  \
  plot_move_parms_times.sh \
  find_python_uses.sh \
  run_all_tests.sh \
  run_python_test.sh \
  force_font_gen.sh \
  save_paper_figures.sh \
  \
  rn.py \
  rmxn.py \
  \
  `cat .mods` \

