From 91e7bfbed3d14853b9b915184239f58c2cfce8bd Mon Sep 17 00:00:00 2001 From: Bertrand Date: Fri, 3 Jun 2022 11:57:49 +0000 Subject: [PATCH] add checkpackage and findfolderpath --- findfolderpath.sh | 5 +++++ packagecheck.sh | 7 +++++++ 2 files changed, 12 insertions(+) create mode 100644 findfolderpath.sh create mode 100644 packagecheck.sh diff --git a/findfolderpath.sh b/findfolderpath.sh new file mode 100644 index 0000000..8bd9597 --- /dev/null +++ b/findfolderpath.sh @@ -0,0 +1,5 @@ +#!bin/bash + +IMAGE_FOLDER=$(find ./ -type d -wholename "*content/images")/* + +echo "$IMAGE_FOLDER" diff --git a/packagecheck.sh b/packagecheck.sh new file mode 100644 index 0000000..e6b1685 --- /dev/null +++ b/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 '