File tree Expand file tree Collapse file tree 14 files changed +15
-40
lines changed Expand file tree Collapse file tree 14 files changed +15
-40
lines changed Original file line number Diff line number Diff line change 1010# @author Jerry Lee (oldratlee at gmail dot com)
1111set -eEuo pipefail
1212
13- # NOTE: DO NOT declare var PROG as readonly in ONE line!
14- PROG=$( basename -- " $0 " )
15- readonly PROG
13+ readonly PROG=${0##*/ }
1614readonly PROG_VERSION=' 2.x-dev'
1715
1816# ###############################################################################
Original file line number Diff line number Diff line change 1212# @author Jerry Lee (oldratlee at gmail dot com)
1313set -eEuo pipefail
1414
15- # NOTE: DO NOT declare var PROG as readonly in ONE line!
16- PROG=$( basename -- " $0 " )
17- readonly PROG
15+ readonly PROG=${0##*/ }
1816readonly PROG_VERSION=' 2.x-dev'
1917
2018# ###############################################################################
Original file line number Diff line number Diff line change 2626# var2=$(echo value1)
2727set -eEuo pipefail
2828
29- # NOTE: DO NOT declare var PROG as readonly in ONE line!
30- PROG=$( basename -- " $0 " )
31- readonly PROG
29+ readonly PROG=${0##*/ }
3230readonly PROG_VERSION=' 2.x-dev'
3331
3432# ###############################################################################
Original file line number Diff line number Diff line change 1111# @author Jerry Lee (oldratlee at gmail dot com)
1212set -eEuo pipefail
1313
14- # NOTE: DO NOT declare var PROG as readonly in ONE line!
15- PROG=$( basename -- " $0 " )
16- readonly PROG
14+ readonly PROG=${0##*/ }
1715readonly PROG_VERSION=' 2.x-dev'
1816
1917# ###############################################################################
Original file line number Diff line number Diff line change 99# @author Jerry Lee (oldratlee at gmail dot com)
1010set -eEuo pipefail
1111
12- PROG=$( basename -- " $0 " )
13- readonly PROG
12+ readonly PROG=${0##*/ }
1413readonly PROG_VERSION=' 2.x-dev'
1514
1615# ###############################################################################
@@ -207,8 +206,7 @@ if [ ! -f "$specified_run_command" ]; then
207206 run_command=$( which " $specified_run_command " )
208207fi
209208run_command=$( portableReadLink " $run_command " )
210- run_command_base_name=$( basename -- " $run_command " )
211- readonly run_command run_command_base_name
209+ readonly run_command run_command_base_name=${run_command##*/ }
212210
213211run_timestamp=$( date " +%Y%m%d_%H%M%S" )
214212readonly run_timestamp
Original file line number Diff line number Diff line change 3131# var2=$(echo value1)
3232set -eEuo pipefail
3333
34- # NOTE: DO NOT declare var PROG as readonly in ONE line!
35- PROG=$( basename -- " $0 " )
36- readonly PROG
34+ readonly PROG=${0##*/ }
3735readonly PROG_VERSION=' 2.x-dev'
3836
3937# ###############################################################################
Original file line number Diff line number Diff line change 1212# @author Jerry Lee (oldratlee at gmail dot com)
1313set -eEuo pipefail
1414
15- # NOTE: DO NOT declare var PROG as readonly in ONE line!
16- PROG=$( basename -- " $0 " )
17- readonly PROG
15+ readonly PROG=${0##*/ }
1816readonly PROG_VERSION=' 2.x-dev'
1917
2018# ###############################################################################
Original file line number Diff line number Diff line change 2525# local var2
2626# var2=$(echo value1)
2727
28- # NOTE: DO NOT declare var PROG as readonly in ONE line!
29- PROG=$( basename -- " $0 " )
30- readonly PROG
28+ readonly PROG=${0##*/ }
3129readonly PROG_VERSION=' 2.x-dev'
3230# choosing between $0 and BASH_SOURCE
3331# https://stackoverflow.com/a/35006505/922688
Original file line number Diff line number Diff line change 1111# @author Jerry Lee (oldratlee at gmail dot com)
1212set -eEuo pipefail
1313
14- # NOTE: DO NOT declare var PROG as readonly in ONE line!
15- PROG=$( basename -- " $0 " )
16- readonly PROG
14+ readonly PROG=${0##*/ }
1715readonly PROG_VERSION=' 2.x-dev'
1816
1917# ###############################################################################
Original file line number Diff line number Diff line change 1010# @author @sunuslee (sunuslee at gmail dot com)
1111set -eEuo pipefail
1212
13- # NOTE: DO NOT declare var PROG as readonly in ONE line!
14- PROG=$( basename -- " $0 " )
15- readonly PROG
13+ readonly PROG=${0##*/ }
1614readonly PROG_VERSION=' 2.x-dev'
1715
1816# ###############################################################################
You canβt perform that action at this time.
0 commit comments