Project

General

Profile

« Previous | Next » 

Revision 9264

lib/sh/util.sh: moved $top_script, $top_dir before internal commands echoing so they can be reset in cd()

View differences:

lib/sh/util.sh
301 301
func_override kw_params__lang
302 302
kw_params() { kw_params__lang "$@"; echo_vars "$@"; } # echo all keyword params
303 303

  
304

  
305
#### paths
306

  
307
top_script="$(canon_rel_path "$0")"; echo_vars top_script # outermost script
308
top_dir="$(dirname "$top_script")"; echo_vars top_dir
309

  
310

  
311
#### verbose output
312

  
313

  
304 314
## internal commands
305 315

  
306 316
.()
......
429 439

  
430 440
#### commands
431 441

  
432
top_script="$(canon_rel_path "$0")"; echo_vars top_script # outermost script
433
top_dir="$(dirname "$top_script")"; echo_vars top_dir
434

  
435 442
require_not_exists() # usage: require_not_exists file || return 0
436 443
{ test ! -e "$1" || type=info die "file "$1" already exists, skipping"; }
437 444

  

Also available in: Unified diff