Skip to content

Commit

Permalink
more run-python-script global declarations; fix comment typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom O'Hara committed Sep 13, 2024
1 parent 510e002 commit 7a2f4f4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tomohara-proper-aliases.bash
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ simple-alias-fn black-plain 'convert-emoticons-aux black'
# run-python-script(script, args): run SCRIPT with ARGS with output to dir/_base-#.out
# and stderr to dir/_base-#.log where # is value of global $_PSL_.
# The arguments are passed along unless USE_STDIN is 1.
# note: Checks for errors afterwards. Use non-locals _PSL_, out_base and log.
# note: Checks for errors afterwards. Uses non-locals _PSL_, out_base and log.
function run-python-script {
## DEBUG: trace-vars _PSL_ out_base log
if [ "$1" = "" ]; then
Expand Down Expand Up @@ -119,8 +119,10 @@ function run-python-script {
# Run script and check for errors
# note: $_PSL_, $log and $out are not local, so available to user afterwards
# TODO3: rework to avoid problem with _PSL_ not being updated (or at least detect the error)!
declare -g _PSL_ log out
local out_base
## OLD:
## declare -g _PSL_ log out
## local out_base
declare -g _PSL_ log out out_base
local module_spec=""
let _PSL_++
out_base="$out_dir/_$script_base.$(TODAY).$_PSL_"
Expand Down

0 comments on commit 7a2f4f4

Please sign in to comment.