feat: remove too much verbose
This commit is contained in:
parent
ce9bf86211
commit
c099b69d85
17
bin/dkpurge
17
bin/dkpurge
@ -1,10 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
NORMAL='\e[0m'
|
||||
BOLD='\e[1m'
|
||||
RED='\e[31m'
|
||||
|
||||
ECHO='echo -e'
|
||||
|
||||
PS="$(docker ps -aq 2> /dev/null)"
|
||||
|
||||
@ -18,10 +14,9 @@ IMG="$(docker images -q 2> /dev/null)"
|
||||
|
||||
|
||||
if [ -n "$PS" ]; then
|
||||
$ECHO "${BOLD}${RED}CONTAINERS${NORMAL}"
|
||||
docker ps -a
|
||||
|
||||
$ECHO -n "Prune Containers? [Y/n/a] "
|
||||
echo -n "Prune Containers? [Y/n/a] "
|
||||
read -r ANS
|
||||
case "${ANS,,}" in
|
||||
'y'|'yes'|'')
|
||||
@ -34,23 +29,23 @@ if [ -n "$PS" ]; then
|
||||
fi
|
||||
|
||||
if [ -n "$VOL" ]; then
|
||||
$ECHO "${BOLD}${RED}VOLUMES${NORMAL}"
|
||||
echo
|
||||
docker volume ls
|
||||
|
||||
$ECHO -n "Prune Volumes? [Y/n] "
|
||||
echo -n "Prune Volumes? [Ya/n] "
|
||||
read -r ANS
|
||||
case "${ANS,,}" in
|
||||
'y'|'yes'|'')
|
||||
'y'|'yes'|'a'|'all'|'')
|
||||
echo "$VOL" | xargs docker volume rm -f 2> /dev/null
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if [ -n "$IMG" ]; then
|
||||
$ECHO "${BOLD}${RED}IMAGES${NORMAL}"
|
||||
echo
|
||||
docker images
|
||||
|
||||
$ECHO -n "Prune Images? [Y/n/a] "
|
||||
echo -n "Prune Images? [Y/n/a] "
|
||||
read -r ANS
|
||||
case "${ANS,,}" in
|
||||
'y'|'yes'|'')
|
||||
|
Loading…
Reference in New Issue
Block a user