]> git.wh0rd.org Git - home.git/commitdiff
add color export for other scripts
authorMike Frysinger <vapier@gentoo.org>
Thu, 5 Apr 2012 20:28:34 +0000 (16:28 -0400)
committerMike Frysinger <vapier@gentoo.org>
Sat, 28 Apr 2012 19:36:46 +0000 (15:36 -0400)
.bin/bash-colors

index bef513039776608154ba7930ce0631732de783c7..b2182b4c2d3ac503268ac2bb810bd59bffb8824f 100755 (executable)
@@ -1,4 +1,21 @@
 #!/bin/bash
+
+if [[ $1 == "--env" ]] ; then
+       colors=(
+               GOOD="\$'\e[32;01m'"
+               WARN="\$'\e[33;01m'"
+               BAD="\$'\e[31;01m'"
+               HILITE="\$'\e[36;01m'"
+               BRACKET="\$'\e[34;0m'"
+               NORMAL="\$'\e[0m'"
+       )
+       for c in "${colors[@]}" ; do
+               echo "${c}"
+       done
+
+       exit 0
+fi
+
 for i in {0..1} ; do
        for j in {30..37} ; do
                echo -e '\e['"${i};${j}mthis color is: \\\\e[${i};${j}m"