Skip to content

Instantly share code, notes, and snippets.

Avatar
💻

José Silva Jr. jsjunior

💻
View GitHub Profile
View update-npm.sh
# !/bin/bash
. ~/.nvm/nvm.sh
. ~/.profile
. ~/.bashrc
nvm install-latest-npm
@jsjunior
jsjunior / update-docker-compose.sh
Last active Apr 18, 2020
Update docker-compose to latest release
View update-docker-compose.sh
# !/bin/bash
O="${HOME}/docker-compose-update.log"
LR=`curl --silent "https://api.github.com/repos/docker/compose/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/'`
V=`docker-compose --version | sed -E 's/,.*//g' | sed -E 's/([^0-9.])+//g'`
if [ $LR = $V ]; then
echo "`date +%F_%T`: Latest version already installed ($LR = $V)" > $O