Skip to content

Commit b62ddbc

Browse files
committed
style: [[ ... ]] is preferred over [
1 parent 990d0d9 commit b62ddbc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

diff-so-fancy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/usr/bin/env bash
22

3-
[ $# -ge 1 -a -f "$1" ] && input="$1" || input="-"
3+
[[ $# -ge 1 ]] && [[ -f "$1" ]] && input="$1" || input="-"
44

55
get_script_dir () {
66
src="${BASH_SOURCE[0]}"
7-
while [ -h "$src" ]; do
7+
while [[ -h "$src" ]]; do
88
dir="$( cd -P "$( dirname "$src" )" && pwd )"
99
src="$(readlink "$src")"
1010
[[ $src != /* ]] && src="$dir/$src"

0 commit comments

Comments
 (0)