ethauvin
04/15/2017, 2:25 AM!/bin/bash
kobalt_version=`kobaltw --version | cut -d "," -f 1 | cut -d " " -f 2`
ver=`curl -w "%{url_effective}" -I -L -s -S <https://github.com/cbeust/kobalt/releases/latest> -o /dev/null | rev | cut -d "/" -f1 | rev`
if [ "$ver" != "$kobalt_version" ]; then
zip=~/kobalt-${ver}.zip
curl -L <https://github.com/cbeust/kobalt/releases/download/${ver}/kobalt-${ver}.zip> -o $zip
cd /usr/local/share
rm -rf kobalt
unzip $zip
mv kobalt-${ver} kobalt
chmod 755 kobalt/bin/*
else
echo "$kobalt_version is the latest."
fi