From a3171ba7e80393c9a51506f801667d332afd10aa Mon Sep 17 00:00:00 2001 From: sigonasr2 Date: Sun, 21 Aug 2022 21:46:29 -0500 Subject: [PATCH] Include C++ in languages Co-authored-by: sigonasr2 --- C++/scripts/build.sh | 7 +++++++ C++/scripts/commit.sh | 20 ++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100755 C++/scripts/build.sh create mode 100755 C++/scripts/commit.sh diff --git a/C++/scripts/build.sh b/C++/scripts/build.sh new file mode 100755 index 0000000..074ffa4 --- /dev/null +++ b/C++/scripts/build.sh @@ -0,0 +1,7 @@ +#Compiles the entire program then runs it, producing an executable. +#C +printf "Running program...\n\n\n" +if g++ $(find . -type f -name "*.cpp") ${CUSTOM_PARAMS} -o ${PROJECT_NAME}; then + ./${PROJECT_NAME} "$@" +fi +printf "\n\n" diff --git a/C++/scripts/commit.sh b/C++/scripts/commit.sh new file mode 100755 index 0000000..0f56a8f --- /dev/null +++ b/C++/scripts/commit.sh @@ -0,0 +1,20 @@ +#Adds a commit message and pushes project to github repository. +#C +COMMIT_MESSAGE="$*" +FIRST_LINE=true +while IFS= read -r line +do +if [ "$FIRST_LINE" = true ]; then + COMMIT_MESSAGE+=" + +Co-authored-by: $line" +FIRST_LINE=false +else + COMMIT_MESSAGE+=" +Co-authored-by: $line" +fi +done < utils/.coauthors +git add -u +git add * +git commit -m "$COMMIT_MESSAGE" +git push \ No newline at end of file