Skip to content

Instantly share code, notes, and snippets.

View okch-codes's full-sized avatar
💾
Coding

Omar Karim Chtioui okch-codes

💾
Coding
View GitHub Profile
@okch-codes
okch-codes / okch-avatar.png
Last active April 12, 2023 11:27
My Avatar
okch-avatar.png
#/bin/bash
echo "====== Docker-compose autoupdater ======"
DC_REMOTE_VERSION=$(curl -s https://api.github.com/repos/docker/compose/releases/latest | jq .name -r)
DESTINATION=/usr/local/bin/docker-compose
echo "🔍 Latest remote version found: ${DC_REMOTE_VERSION}"
# check if docker-compose is installed
if [ -f $DESTINATION ]; then
# check version installed (if present)
DC_LOCAL_VERSION=$(${DESTINATION} -v | cut -d ' ' -f4)