Skip to content

Commit f2e1f15

Browse files
use var to store color table path
1 parent 69f4542 commit f2e1f15

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

gen.sh

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

33
dist=dist/colorEcho.sh
4+
table=table.txt
45

56
echo '#!/usr/bin/env bash' > $dist
67

7-
for color in `cat table.txt | awk '{print $1}'`
8+
for color in `cat $table | awk '{print $1}'`
89
do
910
for light in "" "Light"
1011
do
@@ -30,7 +31,7 @@ do
3031
ulCode='4;'
3132
fi
3233
echo "{" >> $dist
33-
echo ' echo -e "\e['"$ulCode$bCode$code"$(grep $color table.txt | awk '{print $2}')'m$@\e[m"' >> $dist
34+
echo ' echo -e "\e['"$ulCode$bCode$code"$(grep $color $table | awk '{print $2}')'m$@\e[m"' >> $dist
3435
echo "}" >> $dist
3536
done
3637
done

0 commit comments

Comments
 (0)