From 30ecb9d8fb45e473fd80674ab5af7c801ce1f586 Mon Sep 17 00:00:00 2001 From: martinholmer Date: Mon, 5 Jun 2017 15:11:00 -0400 Subject: [PATCH] Rename bash shell scripts to end with .sh extension --- file-upload-tests/README.md | 2 +- file-upload-tests/{cli-results => cli-results.sh} | 2 +- ...calc_package => install_local_taxcalc_package.sh} | 6 +++--- ..._taxcalc_package => uninstall_taxcalc_package.sh} | 2 +- taxcalc/validation/README.md | 2 +- taxcalc/validation/taxsim/README.md | 2 +- taxcalc/validation/taxsim/{test => test.sh} | 4 ++-- taxcalc/validation/taxsim/{tests => tests.sh} | 10 +++++----- taxcalc/validation/{tests => tests.sh} | 12 ++++++------ 9 files changed, 21 insertions(+), 21 deletions(-) rename file-upload-tests/{cli-results => cli-results.sh} (96%) rename taxcalc/cli/{install_local_taxcalc_package => install_local_taxcalc_package.sh} (89%) rename taxcalc/cli/{uninstall_taxcalc_package => uninstall_taxcalc_package.sh} (80%) rename taxcalc/validation/taxsim/{test => test.sh} (96%) rename taxcalc/validation/taxsim/{tests => tests.sh} (90%) rename taxcalc/validation/{tests => tests.sh} (84%) diff --git a/file-upload-tests/README.md b/file-upload-tests/README.md index 30ce1fb4b..a0e25d05c 100644 --- a/file-upload-tests/README.md +++ b/file-upload-tests/README.md @@ -13,7 +13,7 @@ is installed using this command `conda install -c ospc taxcalc`. The contents of this directory include JSON reform and assumption files used in the cross-checking. The local-computer results are -generated by the `cli-results` bash script in this directory. +generated by the `cli-results.sh` bash script in this directory. The TaxBrain results are located at `http://www.ospc.org/taxbrain/RUN/` where `RUN` is the number of the TaxBrain run. diff --git a/file-upload-tests/cli-results b/file-upload-tests/cli-results.sh similarity index 96% rename from file-upload-tests/cli-results rename to file-upload-tests/cli-results.sh index 99614ff81..6719916de 100755 --- a/file-upload-tests/cli-results +++ b/file-upload-tests/cli-results.sh @@ -1,5 +1,5 @@ #!/bin/bash -# USAGE: ./cli-results [save] +# USAGE: ./cli-results.sh [save] if [ -f "puf.csv" ]; then echo "STARTING WITH CLI-RESULTS : `date`" diff --git a/taxcalc/cli/install_local_taxcalc_package b/taxcalc/cli/install_local_taxcalc_package.sh similarity index 89% rename from taxcalc/cli/install_local_taxcalc_package rename to taxcalc/cli/install_local_taxcalc_package.sh index fa097a71f..7e76b2b6d 100755 --- a/taxcalc/cli/install_local_taxcalc_package +++ b/taxcalc/cli/install_local_taxcalc_package.sh @@ -1,5 +1,5 @@ #!/bin/bash -# USAGE: ./install_local_taxcalc_package +# USAGE: ./install_local_taxcalc_package.sh # ACTION: (1) uninstalls any installed taxcalc package (conda uninstall) # (2) executes "conda install conda-build" (if necessary) # (3) builds local taxcalc=0.0.0 package (conda build) @@ -12,7 +12,7 @@ echo "STARTING : `date`" # uninstall any existing taxcalc conda package conda list taxcalc | awk '$1~/taxcalc/{rc=1}END{exit(rc)}' if [ $? -eq 1 ]; then - ./uninstall_taxcalc_package + ./uninstall_taxcalc_package.sh fi # install conda-build package if not present @@ -39,7 +39,7 @@ rmdir dist/ rm -fr taxcalc.egg-info/* rmdir taxcalc.egg-info/ -echo "Execute './uninstall_taxcalc_package' after testing CLI" +echo "Execute './uninstall_taxcalc_package.sh' after testing CLI" echo "FINISHED : `date`" exit 0 diff --git a/taxcalc/cli/uninstall_taxcalc_package b/taxcalc/cli/uninstall_taxcalc_package.sh similarity index 80% rename from taxcalc/cli/uninstall_taxcalc_package rename to taxcalc/cli/uninstall_taxcalc_package.sh index fb3972297..7ac691855 100755 --- a/taxcalc/cli/uninstall_taxcalc_package +++ b/taxcalc/cli/uninstall_taxcalc_package.sh @@ -1,5 +1,5 @@ #!/bin/bash -# USAGE: ./uninstall_local_taxcalc_package +# USAGE: ./uninstall_local_taxcalc_package.sh # NOTE: for those with experience working with compiled languages, # uninstalling a conda package is analogous to 'make clean' conda uninstall taxcalc --yes 2>&1 > /dev/null diff --git a/taxcalc/validation/README.md b/taxcalc/validation/README.md index 9d2fe9eaf..0aee2f468 100644 --- a/taxcalc/validation/README.md +++ b/taxcalc/validation/README.md @@ -61,7 +61,7 @@ The current version of the validation tools in this directory should work on Linux or Mac OS X without any changes and without adding any extra software. Those who want to use these validation tools on Windows will have to do three things: (a) install an AWK interpreter, -(b) install a Tcl interpreter, and (c) translate each `tests` bash script +(b) install a Tcl interpreter, and (c) translate each `tests.sh` bash script into a Windows batch file (tests.bat). The Free Software Foundation provides a free AWK interpreter for Windows (gawk.exe) and ActiveState provides a free Tcl interpreter for Windows (tclsh.exe). diff --git a/taxcalc/validation/taxsim/README.md b/taxcalc/validation/taxsim/README.md index 6f3399a41..457e30777 100644 --- a/taxcalc/validation/taxsim/README.md +++ b/taxcalc/validation/taxsim/README.md @@ -15,7 +15,7 @@ it to the Internet-TAXSIM website using the `56 1` option (in order to do the EITC property-income eligibility test exactly without any smoothing of property income) and requesting detailed intermediate calculations. These two OUTPUT files are compared using the -`taxdiffs.tcl` script. See the `tests` and `test` scripts in this +`taxdiffs.tcl` script. See the `tests.sh` and `test.sh` scripts in this directory for more details. Validation Results diff --git a/taxcalc/validation/taxsim/test b/taxcalc/validation/taxsim/test.sh similarity index 96% rename from taxcalc/validation/taxsim/test rename to taxcalc/validation/taxsim/test.sh index 74a00b580..f326968f2 100755 --- a/taxcalc/validation/taxsim/test +++ b/taxcalc/validation/taxsim/test.sh @@ -6,7 +6,7 @@ # Check command-line arguments if [[ "$#" -lt 2 || "$#" -gt 3 ]]; then echo "ERROR: number of command-line arguments not in 2-to-3 range" - echo "USAGE: bash test LYY REFORM [save]" + echo "USAGE: bash test.sh LYY REFORM [save]" echo " WHERE L is a letter that is valid taxsim_in.tcl L input and" echo " YY is valid taxsim_in.tcl CALENDAR YEAR (20YY) input.;" echo " WHERE REFORM is Internet-TAXSIM option (e.g., '50_1') or" @@ -24,7 +24,7 @@ if [[ "$#" -eq 3 ]]; then SAVE=true else echo "ERROR: optional third command-line argument must be 'save'" - echo "USAGE: bash test LYY REFORM [save]" + echo "USAGE: bash test.sh LYY REFORM [save]" touch testerror exit 1 fi diff --git a/taxcalc/validation/taxsim/tests b/taxcalc/validation/taxsim/tests.sh similarity index 90% rename from taxcalc/validation/taxsim/tests rename to taxcalc/validation/taxsim/tests.sh index e2c578136..16c6fa077 100755 --- a/taxcalc/validation/taxsim/tests +++ b/taxcalc/validation/taxsim/tests.sh @@ -5,7 +5,7 @@ rm -f testerror # .... check number of command-line arguments if [[ "$#" -gt 1 ]]; then echo "ERROR: can specify at most one command-line argument" - echo "USAGE: ./tests [all]" + echo "USAGE: ./tests.sh [all]" echo " (using the 'all' option may execute many tests at a time)" exit 1 fi @@ -16,18 +16,18 @@ if [[ "$#" -eq 1 ]]; then ALLTESTS=true else echo "ERROR: optional command-line argument must be all" - echo "USAGE: ./tests [all]" + echo "USAGE: ./tests.sh [all]" exit 1 fi fi # .... execute validation tests rm -f testerror if [[ "$ALLTESTS" == true ]] ; then - bash test a15 . & - bash test d15 . & + bash test.sh a15 . & + bash test.sh d15 . & wait else - bash test d15 . + bash test.sh d15 . fi if [[ -f "testerror" ]]; then ERROR=1 diff --git a/taxcalc/validation/tests b/taxcalc/validation/tests.sh similarity index 84% rename from taxcalc/validation/tests rename to taxcalc/validation/tests.sh index 4b879470e..d8a86dbc7 100755 --- a/taxcalc/validation/tests +++ b/taxcalc/validation/tests.sh @@ -3,7 +3,7 @@ # .... check number of command-line arguments if [[ "$#" -gt 1 ]]; then echo "ERROR: can specify at most one command-line argument" - echo "USAGE: ./tests [all]" + echo "USAGE: ./tests.sh [all]" echo " (using the 'all' option may execute four tests at a time)" exit 1 fi @@ -14,7 +14,7 @@ if [[ "$#" -eq 1 ]]; then ALLTESTS=true else echo "ERROR: optional command-line argument must be all" - echo "USAGE: ./tests [all]" + echo "USAGE: ./tests.sh [all]" exit 1 fi fi @@ -22,18 +22,18 @@ echo "STARTING WITH VALIDATION TESTS : `date`" if [[ $ALLTESTS == true ]] ; then # execute all tests sequentially cd taxsim - bash tests all + bash tests.sh all cd .. # cd drake - # bash tests all + # bash tests.sh all # cd .. else # execute basic tests simultaneously cd taxsim - bash tests & + bash tests.sh & cd .. # cd drake - # bash tests & + # bash tests.sh & # cd .. wait fi