-
Notifications
You must be signed in to change notification settings - Fork 0
/
kc-extension.sh
executable file
·52 lines (48 loc) · 1.73 KB
/
kc-extension.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
source "$SCRIPT_DIR/scripts/utils.sh"
show_help() {
echo "Add Quarkus/Quarkiverse extensions to your Keycloak deployment"
echo
echo "Usage: ./kc-extension.sh [OPTIONS] <command>"
echo
echo "Options:"
echo " -h, --help Display this help message."
echo
echo "Commands:"
echo " add <extension> Add Quarkus/Quarkiverse extension present in the list of extensions."
echo " add <groupId:artifactId:version> Manually add Quarkiverse or your own extension to the project by specifying GAV."
echo " build Rebuild the Keycloak distribution with custom extensions."
echo " list Display all available extensions."
echo " start-dev Execute the generated Keycloak distribution in development mode."
echo " image Build extended Keycloak builder image with your custom extensions."
}
# Store the subcommand and shift it out of the argument list
command="${1:-help}"
shift
# Use case to handle different subcommands
case "$command" in
add)
"$SCRIPT_DIR"/scripts/command-add.sh "$@"
;;
build)
"$SCRIPT_DIR"/scripts/command-build.sh "$@"
;;
list)
"$SCRIPT_DIR"/scripts/command-list.sh "$@"
;;
start-dev)
"$SCRIPT_DIR"/scripts/command-start-dev.sh "$@"
;;
image)
"$SCRIPT_DIR"/scripts/command-image.sh "$@"
;;
-h|--help)
show_help
;;
*)
echo "Unknown command: $command"
echo "Type './kc-extension.sh --help' for available commands."
exit 1
;;
esac