Browse Source

add checkpackage and findfolderpath

master
Bertrand Janvoie 3 years ago
parent
commit
91e7bfbed3
  1. 5
      findfolderpath.sh
  2. 7
      packagecheck.sh

5
findfolderpath.sh

@ -0,0 +1,5 @@
#!bin/bash
IMAGE_FOLDER=$(find ./ -type d -wholename "*content/images")/*
echo "$IMAGE_FOLDER"

7
packagecheck.sh

@ -0,0 +1,7 @@
REQUIRED_PKG="docker-compose"
PKG_OK=$(dpkg-query -W --showformat='${Status}\n' $REQUIRED_PKG|grep "install ok installed")
echo Checking for $REQUIRED_PKG: $PKG_OK
if [ "" = "$PKG_OK" ]; then
echo "No $REQUIRED_PKG. Setting up $REQUIRED_PKG."
curl -L "https://github.com/docker/compose/releases/download/$(curl https://github.com/docker/compose/releases | grep -m1 '<a href="/docker/compose/releases/download/' | grep -o 'v[0-9:].[0-9].[0-9]')/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
fi
Loading…
Cancel
Save