Skip to content

Commit a875187

Browse files
committed
git subrepo pull ext/test-more-bash
subrepo: subdir: "ext/test-more-bash" merged: "5d17cce" upstream: origin: "[email protected]:ingydotnet/test-more-bash.git" branch: "master" commit: "5d17cce" git-subrepo: version: "0.3.0" origin: "[email protected]:ingydotnet/git-subrepo" commit: "92244e7"
1 parent d93abd0 commit a875187

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

ext/test-more-bash/.gitrepo

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
[subrepo]
77
remote = [email protected]:ingydotnet/test-more-bash.git
88
branch = master
9-
commit = 496b86b44fc11ba85c4304ab5f8410d9c46fa8c9
10-
parent = 5d976e42acebd30db659d3aa61ac14bbcd9db33c
9+
commit = 5d17cce849778bf1f28e8fe1b9c7a29e654ff14e
10+
parent = d93abd013d51d24fa236e55f5c10b129765a0234
1111
cmdver = 0.3.0

ext/test-more-bash/ext/bashplus/.gitrepo

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
[subrepo]
77
remote = [email protected]:ingydotnet/bashplus.git
88
branch = master
9-
commit = 7fe0b93c0919deb7b5aecf2cb666ab85562210d5
10-
parent = 52c08958be3ef483ad40c28f27cba2dbfc06273a
9+
commit = 8254f9fb48c1d841326434a1005b2a61f42ff7ed
10+
parent = 496b86b44fc11ba85c4304ab5f8410d9c46fa8c9
1111
cmdver = 0.3.0

ext/test-more-bash/ext/bashplus/lib/bash+.bash

+6-6
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ bash+:export:std() { @ use die warn; }
2626
bash+:use() {
2727
local library_name="${1:?bash+:use requires library name}"; shift
2828
local library_path="$(bash+:findlib $library_name)"
29-
[ -n "$library_path" ] || {
29+
[[ -n $library_path ]] || {
3030
bash+:die "Can't find library '$library_name'." 1
3131
}
3232
source "$library_path"
@@ -41,7 +41,7 @@ bash+:use() {
4141
bash+:import() {
4242
local arg=
4343
for arg; do
44-
if [[ "$arg" =~ ^: ]]; then
44+
if [[ $arg =~ ^: ]]; then
4545
bash+:import `bash+:export$arg`
4646
else
4747
bash+:fcopy bash+:$arg $arg
@@ -54,7 +54,7 @@ bash+:fcopy() {
5454
bash+:can "${1:?bash+:fcopy requires an input function name}" ||
5555
bash+:die "'$1' is not a function" 2
5656
local func=$(type "$1" 3>/dev/null | tail -n+3)
57-
[ -n "$3" ] && "$3"
57+
[[ -n $3 ]] && "$3"
5858
eval "${2:?bash+:fcopy requires an output function name}() $func"
5959
}
6060

@@ -72,10 +72,10 @@ bash+:die() {
7272
local msg="${1:-Died}"
7373
printf "${msg//\\n/$'\n'}" >&2
7474
local trailing_newline_re=$'\n''$'
75-
[[ "$msg" =~ $trailing_newline_re ]] && exit 1
75+
[[ $msg =~ $trailing_newline_re ]] && exit 1
7676

7777
local c=($(caller ${DIE_STACK_LEVEL:-${2:-0}}))
78-
[ ${#c[@]} -eq 2 ] &&
78+
(( ${#c[@]} == 2 )) &&
7979
msg=" at line %d of %s" ||
8080
msg=" at line %d in %s of %s"
8181
printf "$msg\n" ${c[@]} >&2
@@ -88,5 +88,5 @@ bash+:warn() {
8888
}
8989

9090
bash+:can() {
91-
[ "$(type -t "${1:?bash+:can requires a function name}")" == function ]
91+
[[ $(type -t "${1:?bash+:can requires a function name}") == function ]]
9292
}

0 commit comments

Comments
 (0)