Skip to content

Commit

Permalink
Added exit codes
Browse files Browse the repository at this point in the history
  • Loading branch information
killianbrackey committed Apr 23, 2016
1 parent 9af6444 commit 4d5510c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ In order to use the volume capabilities, it is required that the Docker Daemon i
-i or --images Stops and removes all Containers and Images
-s or --stop Stops all running Containers

-l or --log Adding this as an additional flag will list all"
-l or --log Adding this as an additional flag will list all
image, volume, and container deleting output


Expand Down
8 changes: 2 additions & 6 deletions batsTests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -170,16 +170,12 @@
}
# Testing for successful restart on Linux
@test "Restart function" {
#./docker-clean -a | grep 'stop'
./docker-clean -a | grep 'stop'
#ps -e | grep 'docker'

run docker ps &>/dev/null
[ $status = 0 ]
#build
#[ $status = 0 ]
#run ./docker-clean -a
#[ $status = 0 ]
#clean

}

# Helper FUNCTIONS
Expand Down
2 changes: 2 additions & 0 deletions docker-clean
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ function printVersion {
else
echo "Your Version of Docker is below 1.9.0 which is required for full functionality."
echo "Please upgrade your Docker daemon. Until then, the Volume processing will not work."
exit 1
fi
}

Expand Down Expand Up @@ -237,6 +238,7 @@ function restartMachine {
echo Windows compatibility work in progress
echo It you feel you are seeing this as an error please visit
echo "https://github.com/ZZROTDesign/docker-clean and open an issue."
exit 2
fi
}

Expand Down
2 changes: 2 additions & 0 deletions playground.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/bash
# This script is used to build and try test cases during development

# OPTIONS="Hello Quit"
# select opt in $OPTIONS; do
# if [ "$opt" = "Quit" ]; then
Expand Down

0 comments on commit 4d5510c

Please sign in to comment.