- Make sure you don't have Jenkins installed from Ubuntu repositories -- you'll get problems if you try to mix it with upstream packages
apt-get purge jenkins --auto-remove
- Add the upstream Jenkins package repository
function hex_to_ansi(){ | |
# Get the individual color components as decimals | |
HEX=$(echo "$1" | tr -d '#' | tr '[:lower:]' '[:upper:]') | |
DIGITS=$(( ${#HEX} / 3 )) | |
R=$(( 16#${HEX:$(( DIGITS * 0 )):$DIGITS} )) | |
G=$(( 16#${HEX:$(( DIGITS * 1 )):$DIGITS} )) | |
B=$(( 16#${HEX:$(( DIGITS * 2 )):$DIGITS} )) | |
# Handle grey ramp | |
if [ "`echo $(( R-G )) | tr -d '-'`" -lt 16 ]\ |