kevinschoon-pomo/docs/install.sh

30 lines
942 B
Bash
Raw Normal View History

2019-02-10 21:39:45 +01:00
#!/bin/bash
2019-03-17 20:28:33 +01:00
POMO_VERSION="0.7.1"
OSX_MD5="369a489fc1e9af234cd5db099c3efd83"
LINUX_MD5="973f5c83218d1d3df5e43a2e6c171b7f"
2019-02-10 21:39:45 +01:00
OSX_TARBALL="https://github.com/kevinschoon/pomo/releases/download/$POMO_VERSION/pomo-$POMO_VERSION-darwin-amd64"
LINUX_TARBALL="https://github.com/kevinschoon/pomo/releases/download/$POMO_VERSION/pomo-$POMO_VERSION-linux-amd64"
install_pomo() {
echo "Installing Pomo..."
if [[ "$OSTYPE" == darwin* ]] ; then {
curl -L -o pomo "$OSX_TARBALL" && \
[[ $(md5 -r pomo) == "$OSX_MD5" ]] && \
chmod +x pomo && \
./pomo -v
} elif [[ "$OSTYPE" == linux* ]] ; then {
curl -L -o pomo "$LINUX_TARBALL" && \
echo "$LINUX_MD5 pomo" | md5sum -c - && \
chmod +x pomo && \
./pomo -v
} else {
echo "cannot detect OS type"
return 1
}
fi
echo "Pomo $POMO_VERSION installed, copy ./pomo to somewhere on your path."
}
install_pomo