File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,6 +4,10 @@ log_info() {
44 printf " \n\e[0;35m $1 \e[0m\n\n"
55}
66
7+ log_warn () {
8+ printf " \e[0;33m $1 \e[0m\n"
9+ }
10+
711start () {
812 log_info " Fetching latest HPC Toolset Images.."
913 docker-compose pull
@@ -30,9 +34,18 @@ destroy() {
3034}
3135
3236cleanup () {
33- log_info " Removing HPC Toolset containers and images.."
34- destroy
35- docker rmi $( docker images -f " reference=ubccr/hpcts*" -q)
37+ log_warn " ** WARNING: This will remove all container images and you'll need to re-download **"
38+ log_warn " You probably want to try running the 'destroy' command first."
39+ echo " "
40+ read -p " Do you want to proceed? (yes/no) " yn
41+
42+ if [[ $yn == y* ]]; then
43+ log_info " Removing HPC Toolset containers and images.."
44+ destroy
45+ docker rmi $( docker images -f " reference=ubccr/hpcts*" -q)
46+ else
47+ log_info " cleanup cancelled. existing.."
48+ fi
3649}
3750
3851case " $1 " in
You can’t perform that action at this time.
0 commit comments