Skip to content

Commit d456066

Browse files
authored
Add command handling for main.py in mfc.sh
1 parent d641c88 commit d456066

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

mfc.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,20 @@ fi
8383

8484
echo
8585

86+
# Run the main.py bootstrap script
87+
# If only flags given (no command), show help without passing flags
88+
has_command=false
89+
for arg in "$@"; do
90+
case "$arg" in -*) ;; *) has_command=true; break ;; esac
91+
done
92+
if [ "$has_command" = true ]; then
93+
python3 "$(pwd)/toolchain/main.py" "$@"
94+
else
95+
python3 "$(pwd)/toolchain/main.py"
96+
fi
97+
code=$?
98+
99+
echo
86100

87101
if [ $code -ne 0 ]; then
88102
error "main.py finished with a $code exit code."

0 commit comments

Comments
 (0)