Skip to content

Commit 244613a

Browse files
committed
LPD-73748 lec.sh: applies arg parsing pattern to the share command
1 parent 7fcf3ea commit 244613a

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

scripts/cli/lec.sh

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -810,12 +810,23 @@ cmd_remove() {
810810
cmd_share() {
811811
_checkProjectDirectory
812812

813-
local exportFlag="${1}"
813+
local FLAG_EXPORT=0
814+
815+
while [[ $# -gt 0 ]]; do
816+
case "${1}" in
817+
--export)
818+
shift && FLAG_EXPORT=1
819+
;;
820+
*)
821+
shift
822+
;;
823+
esac
824+
done
814825

815826
(
816827
cd "${PROJECT_DIRECTORY}" || exit
817828

818-
if [[ "${exportFlag}" == "--export" ]]; then
829+
if [[ "${FLAG_EXPORT}" -gt 1 ]]; then
819830
_print_step "Exporting container data..."
820831

821832
if ! ./gradlew exportContainerData --quiet; then

0 commit comments

Comments
 (0)