Skip to content

Commit eda696c

Browse files
detect $dist/ColorEcho.bash before use it
1 parent 9f872d7 commit eda696c

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

generator.sh

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

3+
shopt -s expand_aliases
4+
35
dist=dist/ColorEcho
46
table="color table.txt"
57

6-
# use ColorEcho
7-
. "$dist".bash
8+
if [ ! -r "$dist".bash ]; then
9+
alias echo.Green='echo'
10+
alias echo.BoldYellow='echo'
11+
else
12+
# use ColorEcho
13+
. "$dist".bash
14+
fi
815

916
echo.Green ColorEcho generator start!
1017

0 commit comments

Comments
 (0)