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=$?