This commit is contained in:
2025-05-03 01:36:24 +03:00
parent 96b0571d30
commit f7c107b877
3 changed files with 3 additions and 143 deletions
+3 -2
View File
@@ -1,6 +1,7 @@
#!/bin/bash
# Check if the correct number of arguments are provided
# Compile and run as in unicorn
if [ "$#" -ne 2 ]; then
echo "Usage: $0 <cpp_file> <argument>"
exit 1
@@ -13,7 +14,7 @@ ARGUMENT=$2
clang-format -i -style=file "$CPP_FILE"
# Compile the C++ file
g++ "$CPP_FILE" -o run
g++ "$CPP_FILE" -o run -O2 -Wall -Werror -std=gnu++23 -lm
# Check if the compilation was successful
if [ $? -ne 0 ]; then