From a7cd945abca75e914296404b9cd0f75ad7f08b19 Mon Sep 17 00:00:00 2001 From: Taylor Bockman Date: Thu, 19 Dec 2019 21:09:56 -0800 Subject: [PATCH] Add sample project so project can be compiled --- dotfiles/bash/scripts/cgen.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dotfiles/bash/scripts/cgen.sh b/dotfiles/bash/scripts/cgen.sh index e834af0..e7e3b48 100644 --- a/dotfiles/bash/scripts/cgen.sh +++ b/dotfiles/bash/scripts/cgen.sh @@ -52,6 +52,18 @@ echo "ENDIF(CMAKE_BUILD_TYPE MATCHES DEBUG)" >> $cmake_config echo "" >> $cmake_config echo "add_executable($name \${SOURCE} \${INCLUDE})" >> $cmake_config +sample_file=$name/src/main.c + +echo "#include " >> $sample_file +echo "" +echo "" +echo "int main(int argc, char **argv)" >> $sample_file +echo "{" >> $sample_file +echo " printf(\"Hello, world!\\n\")" >> $sample_file +echo " return 0;" >> $sample_file +echo "}" >> $sample_file +echo "" >> $sample_file + git --version 2>&1 >/dev/null GIT_IS_AVAILABLE=$?