Skip to content

Commit a61b20a

Browse files
committed
bump to v20250815
- improved detector for `CD` & `SCRIPT` - improved `simple-entry.sh` - add `LS_OPT` definition - cleanup dbg codes in `darwin-only.sh` - fix `which()`
1 parent fe55048 commit a61b20a

File tree

4 files changed

+16
-9
lines changed

4 files changed

+16
-9
lines changed

CHANGELOG

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# HISTORY
22

3+
- v20250815
4+
- improved detector for CD & SCRIPT
5+
- improved simple-entry.sh
6+
- add LS_OPT definition
7+
- cleanup dbg codes in darwin-only.sh
8+
- fix which()
9+
310
- v20250808
411
- added color supports; added `wrn'
512
- update gob-lazy

bash-lite.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#
99
# bash.sh:
1010
# Standard Template for bash/zsh developing.
11-
# Version: v20250808
11+
# Version: v20250815
1212
# License: MIT
1313
# Site: https://github/hedzr/bash.sh
1414
#
@@ -106,7 +106,7 @@ _my_main_do_sth() {
106106

107107
########################################################
108108

109-
#### HZ Tail BEGIN #### v20250808 ####
109+
#### HZ Tail BEGIN #### v20250815 ####
110110
in_debug() { (($DEBUG)); }
111111
in_provisioning() { (($PROVISIONING)); } ## return exit status as true if $PROVISIONING is not equal to 0
112112
is_root() { [ "$(id -u)" = "0" ]; }
@@ -725,7 +725,7 @@ main_do_sth() {
725725
fi
726726
((${HAS_END:-0})) && { debug_begin && echo -n 'Success!' && debug_end; } || return $res_ # { [ $# -eq 0 ] && :; }
727727
}
728-
BASH_SH_VERSION=v20250808
728+
BASH_SH_VERSION=v20250815
729729
DEBUG=${DEBUG:-0}
730730
# trans_readlink() { DIR="${1%/*}" && (cd $DIR && pwd -P); }
731731
# is_darwin && realpathx() { [[ $1 == /* ]] && echo "$1" || { DIR="${1%/*}" && DIR=$(cd $DIR && pwd -P) && echo "$DIR/$(basename $1)"; }; } || realpathx() { readlink -f $*; }
@@ -735,4 +735,4 @@ in_sourcing && {
735735
if_vagrant && [ "$SCRIPT" == "/tmp/vagrant-shell" ] && { [ -d $CD/ops.d ] || CD=/vagrant/bin; }
736736
[ -L "$SCRIPT" ] && debug linked script found && SCRIPT=$(realpathx "$SCRIPT") && CD=$(dirname "$SCRIPT")
737737
in_sourcing || main_do_sth "$@"
738-
#### HZ Tail END #### v20250808 ####
738+
#### HZ Tail END #### v20250815 ####

bash.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#
99
# bash.sh:
1010
# Standard Template for bash/zsh developing.
11-
# Version: v20250808
11+
# Version: v20250815
1212
# License: MIT
1313
# Site: https://github.com/hedzr/bash.sh
1414
#
@@ -257,7 +257,7 @@ _bash_sh_load_env_files() {
257257

258258
########################################################
259259

260-
#### HZ Tail BEGIN #### v20250808 ####
260+
#### HZ Tail BEGIN #### v20250815 ####
261261
in_debug() { (($DEBUG)); }
262262
in_provisioning() { (($PROVISIONING)); } ## return exit status as true if $PROVISIONING is not equal to 0
263263
is_root() { [ "$(id -u)" = "0" ]; }
@@ -1348,7 +1348,7 @@ main_do_sth() {
13481348
# disabling this logic is still simple by defining HAS_END=1.
13491349
((${HAS_END:-0})) && { debug_begin && echo -n 'Success!' && debug_end; } || return $result_code # { [ $# -eq 0 ] && :; }
13501350
}
1351-
BASH_SH_VERSION=v20250808
1351+
BASH_SH_VERSION=v20250815
13521352
DEBUG=${DEBUG:-0}
13531353
PROVISIONING=${PROVISIONING:-0}
13541354
SUDO=sudo && [ "$(id -u)" = "0" ] && SUDO= || :
@@ -1379,4 +1379,4 @@ path_in_orb_host "$0" && : || { [ -L "$SCRIPT" ] && debug "$(safety "linked scri
13791379
# CD=$(cd `dirname "$0"`;pwd)
13801380
# It will open a sub-shell to print the folder name of the running shell-script.
13811381
in_sourcing && _bash_sh_load_import_files || main_do_sth "$@"
1382-
#### HZ Tail END #### v20250808 ####
1382+
#### HZ Tail END #### v20250815 ####

simple-entry.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ tip() { printf "\e[0;38;2;133;133;133m>>> $@\e[0m\n"; }
3232
wrn() { printf "\e[0;38;2;172;172;22m... [WARN] \e[0;38;2;11;11;11m$@\e[0m\n"; }
3333
err() { printf "\e[0;33;1;133;133;133m>>> $@\e[0m\n" 1>&2; }
3434
fn_exists() { LC_ALL=C type $1 2>/dev/null | grep -qE '(shell function)|(a function)'; }
35-
CD="$(cd $(dirname "$0") && pwd)" && BASH_SH_VERSION=v20250808 && DEBUG=${DEBUG:-0} && PROVISIONING=${PROVISIONING:-0}
35+
CD="$(cd $(dirname "$0") && pwd)" && BASH_SH_VERSION=v20250815 && DEBUG=${DEBUG:-0} && PROVISIONING=${PROVISIONING:-0}
3636
SUDO=sudo && [ "$(id -u)" = "0" ] && SUDO=
3737
LS_OPT="--color" && is_darwin && LS_OPT="-G"
3838
(($#)) && {

0 commit comments

Comments
 (0)