Skip to content

Commit

Permalink
feat: clean-up after install-docker-compose (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
EricRibeiro authored Aug 22, 2022
1 parent 37c70de commit 87dc209
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/scripts/install-docker-compose.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
#!/usr/bin/env bash

trap_exit() {
# clean-up
printf '%s\n' "Cleaning up..."
[ -f "$DOCKER_SHASUM_FILENAME" ] && rm -f "$DOCKER_SHASUM_FILENAME"
}
trap trap_exit EXIT

# checking for root user
if [[ $(id -u) -eq 0 ]]; then
SUDO=""
Expand Down Expand Up @@ -83,4 +90,4 @@ $SUDO mv "$DOCKER_COMPOSE_RELEASE" "$PARAM_INSTALL_DIR"/docker-compose
$SUDO chmod +x "$PARAM_INSTALL_DIR"/docker-compose

# verify version
echo "$(docker-compose --version) has been installed to $(command -v docker-compose)"
echo "$(docker-compose --version) has been installed to $(command -v docker-compose)"

0 comments on commit 87dc209

Please sign in to comment.