Skip to content

Commit

Permalink
Added check for mutually exclusive options.
Browse files Browse the repository at this point in the history
  • Loading branch information
kilo52 committed Jan 27, 2024
1 parent 5ee86ec commit 25a29e7
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 0 deletions.
5 changes: 5 additions & 0 deletions c/01_executable/source/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ if [[ $ARG_SHOW_HELP == true ]]; then
exit 0;
fi

if [[ $ARG_CONFIG == true && $ARG_SKIP_CONFIG == true ]]; then
echo "Cannot specify both --config and --skip-config options";
exit 1;
fi

# Check clean flag
if [[ $ARG_CLEAN == true ]]; then
if [ -d "build" ]; then
Expand Down
5 changes: 5 additions & 0 deletions c/02_library/source/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ if [[ $ARG_SHOW_HELP == true ]]; then
exit 0;
fi

if [[ $ARG_CONFIG == true && $ARG_SKIP_CONFIG == true ]]; then
echo "Cannot specify both --config and --skip-config options";
exit 1;
fi

# Check clean flag
if [[ $ARG_CLEAN == true ]]; then
if [ -d "build" ]; then
Expand Down
5 changes: 5 additions & 0 deletions cpp/01_executable/source/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ if [[ $ARG_SHOW_HELP == true ]]; then
exit 0;
fi

if [[ $ARG_CONFIG == true && $ARG_SKIP_CONFIG == true ]]; then
echo "Cannot specify both --config and --skip-config options";
exit 1;
fi

# Check clean flag
if [[ $ARG_CLEAN == true ]]; then
if [ -d "build" ]; then
Expand Down
5 changes: 5 additions & 0 deletions cpp/02_library/source/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ if [[ $ARG_SHOW_HELP == true ]]; then
exit 0;
fi

if [[ $ARG_CONFIG == true && $ARG_SKIP_CONFIG == true ]]; then
echo "Cannot specify both --config and --skip-config options";
exit 1;
fi

# Check clean flag
if [[ $ARG_CLEAN == true ]]; then
if [ -d "build" ]; then
Expand Down
5 changes: 5 additions & 0 deletions cpp/03_server-poco/source/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ if [[ $ARG_SHOW_HELP == true ]]; then
exit 0;
fi

if [[ $ARG_CONFIG == true && $ARG_SKIP_CONFIG == true ]]; then
echo "Cannot specify both --config and --skip-config options";
exit 1;
fi

# Check clean flag
if [[ $ARG_CLEAN == true ]]; then
if [ -d "build" ]; then
Expand Down
5 changes: 5 additions & 0 deletions cpp/04_desktop_imgui/source/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ if [[ $ARG_SHOW_HELP == true ]]; then
exit 0;
fi

if [[ $ARG_CONFIG == true && $ARG_SKIP_CONFIG == true ]]; then
echo "Cannot specify both --config and --skip-config options";
exit 1;
fi

# Check clean flag
if [[ $ARG_CLEAN == true ]]; then
if [ -d "build" ]; then
Expand Down

0 comments on commit 25a29e7

Please sign in to comment.