Skip to content

Commit 92769d1

Browse files
Minor readability and maintainability refactor in generate.sh
1 parent e0543b3 commit 92769d1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

generator.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ distPrefix="ColorEcho"
88
table="color table.txt"
99

1010
# use ColorEcho
11+
bashDist="${distFolder}/${distPrefix}.bash"
1112
# shellcheck source=dist/ColorEcho.bash
12-
if [ ! -r "${distFolder}/${distPrefix}.bash" ] || [ ! -s "${distFolder}/${distPrefix}.bash" ] || ! . "${distFolder}/${distPrefix}.bash" &> /dev/null; then
13-
echo "${distFolder}/${distPrefix}.bash" is not usable, fallback to use origin echo
13+
if [ ! -r "$bashDist" ] || [ ! -s "$bashDist" ] || ! . "$bashDist" &> /dev/null; then
14+
echo "${bashDist}" is not usable, fallback to use origin echo
1415
alias echo.BoldRed='echo'
1516
alias echo.BoldGreen='echo'
1617
alias echo.BoldYellow='echo'

0 commit comments

Comments
 (0)