File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33shopt -s expand_aliases
44
5- dist=dist/ColorEcho
5+ distFolder=dist
6+ distPrefix=ColorEcho
67table=" 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'
1112else
1213 # use ColorEcho
13- . " $dist " .bash
14+ . " $distFolder / $distPrefix " .bash
1415fi
1516
1617echo.Green ColorEcho generator start!
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
123124
124125# zsh can use bash's script
125126echo.BoldYellow Generating ColorEcho for zsh shell ...
126- cp $dist .bash $dist .zsh
127+ cp $distFolder / $distPrefix .bash $distFolder / $distPrefix .zsh
127128
128129echo.Green ColorEcho generator end!
You canβt perform that action at this time.
0 commit comments