Files
DetectionLab/Vagrant/resources/malcolm/shared/bin/docker-load-wait.sh
2021-08-06 10:35:01 +02:00

16 lines
594 B
Bash
Executable File

#!/bin/bash
# Copyright (c) 2021 Battelle Energy Alliance, LLC. All rights reserved.
function finish {
pkill -f "zenity.*Preparing Malcolm"
}
if [[ -f /malcolm_images.tar.gz ]] || pgrep -f "docker load" >/dev/null 2>&1 || pgrep -f "docker-untar" >/dev/null 2>&1; then
trap finish EXIT
yes | zenity --progress --pulsate --no-cancel --auto-close --text "Malcolm Docker images are loading, please wait..." --title "Preparing Malcolm" &
while [[ -f /malcolm_images.tar.gz ]] || pgrep -f "docker load" >/dev/null 2>&1 || pgrep -f "docker-untar" >/dev/null 2>&1; do
sleep 2
done
fi