-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refinement and update Grass image (#57)
- Loading branch information
Showing
13 changed files
with
138 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,32 @@ | ||
#!/bin/sh | ||
|
||
export CONTAINER_ALIAS="docker" | ||
print_no_runtime() { | ||
printf "No $CONTAINER_ALIAS runtime installed.\nPlease install container runtime from tool menu.\n" | ||
printf "\nPress Enter to continue..."; read input | ||
} | ||
|
||
if docker compose version > /dev/null 2>&1; then | ||
export CONTAINER_COMPOSE="$CONTAINER_ALIAS compose" | ||
else | ||
export CONTAINER_COMPOSE="$CONTAINER_ALIAS-compose" | ||
fi | ||
register_compose() { | ||
if $CONTAINER_ALIAS compose version > /dev/null 2>&1; then | ||
export CONTAINER_COMPOSE="$CONTAINER_ALIAS compose" | ||
else | ||
export CONTAINER_COMPOSE="$CONTAINER_ALIAS-compose" | ||
fi | ||
} | ||
|
||
register_runtime() { | ||
export CONTAINER_ALIAS="docker" | ||
|
||
if [ "$(uname)" = "Linux" ]; then | ||
if [ -n "$WSL_DISTRO_NAME" ]; then | ||
export HAS_CONTAINER_RUNTIME="$(where.exe $CONTAINER_ALIAS 2> /dev/null >&1)" | ||
else | ||
export HAS_CONTAINER_RUNTIME="$(command -v $CONTAINER_ALIAS 2> /dev/null 1>&1)" | ||
fi | ||
fi | ||
register_compose | ||
} | ||
|
||
case "$1" in | ||
--register) register_compose ;; | ||
*) register_runtime ;; | ||
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.