Skip to content

Commit

Permalink
Merge pull request #1391 from martinholmer/rename-shell-scripts
Browse files Browse the repository at this point in the history
Rename bash shell scripts so that they have .sh extension
  • Loading branch information
martinholmer authored Jun 5, 2017
2 parents 8849d21 + 30ecb9d commit 2fadfed
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion file-upload-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -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`"
Expand Down
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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
Expand All @@ -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
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion taxcalc/validation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion taxcalc/validation/taxsim/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
12 changes: 6 additions & 6 deletions taxcalc/validation/tests → taxcalc/validation/tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -14,26 +14,26 @@ 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
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
Expand Down

0 comments on commit 2fadfed

Please sign in to comment.