Browse Source

Add sample project so project can be compiled

master
Taylor Bockman 5 years ago
parent
commit
a7cd945abc
  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 "" >> $cmake_config
echo "add_executable($name \${SOURCE} \${INCLUDE})" >> $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 --version 2>&1 >/dev/null
GIT_IS_AVAILABLE=$? GIT_IS_AVAILABLE=$?

Loading…
Cancel
Save