Browse Source

Add sample project so project can be compiled

Taylor Bockman 5 years ago
parent
commit
2a627bdbaf
  1. 12
      dotfiles/bash/scripts/cgen.sh

12
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 <stdio.h>" >> $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=$?

Loading…
Cancel
Save