Skip to content

Commit d0a328a

Browse files
separate $dist into $distFolder and $distPrefix
1 parent eda696c commit d0a328a

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

β€Žgenerator.shβ€Ž

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22

33
shopt -s expand_aliases
44

5-
dist=dist/ColorEcho
5+
distFolder=dist
6+
distPrefix=ColorEcho
67
table="color table.txt"
78

8-
if [ ! -r "$dist".bash ]; then
9+
if [ ! -r "$distFolder/$distPrefix".bash ]; then
910
alias echo.Green='echo'
1011
alias echo.BoldYellow='echo'
1112
else
1213
# use ColorEcho
13-
. "$dist".bash
14+
. "$distFolder/$distPrefix".bash
1415
fi
1516

1617
echo.Green ColorEcho generator start!
@@ -61,7 +62,7 @@ do
6162
para='@'
6263
esac
6364

64-
newDist="$dist.$shell"
65+
newDist="$distFolder/$distPrefix.$shell"
6566
echo "#!/usr/bin/env $shell" > $newDist
6667
for color in `cat "$table" | awk '{print $1}'`
6768
do
@@ -123,6 +124,6 @@ done
123124

124125
#zsh can use bash's script
125126
echo.BoldYellow Generating ColorEcho for zsh shell ...
126-
cp $dist.bash $dist.zsh
127+
cp $distFolder/$distPrefix.bash $distFolder/$distPrefix.zsh
127128

128129
echo.Green ColorEcho generator end!

0 commit comments

Comments
Β (0)