Skip to content
This repository has been archived by the owner on Apr 7, 2023. It is now read-only.

Commit

Permalink
New command to test if a term supports colours
Browse files Browse the repository at this point in the history
  • Loading branch information
tobybatch committed Jul 21, 2016
1 parent 4019b29 commit e2bdae5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions colour-test
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

if test -t 1; then
ncolors=$(tput colors)
if test -n "$ncolors" && test $ncolors -ge 8; then
exit 0
else
exit 1
fi
fi
2 changes: 1 addition & 1 deletion drupal-tag
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ if [ -z "$NEWBRANCH" ]; then
bumpUp ${MAJOR_VERSION} ${MINOR_VERSION} ${PATCH_VERSION} ${BUMP}
NEW_TAG="${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}"
else
NEW_TAG=$NEWBRANCH
NEW_TAG="$NEWBRANCH"
fi

echo $NEW_TAG > $NEWCHANGELOG
Expand Down

0 comments on commit e2bdae5

Please sign in to comment.