This is a simple Bash script, git-init-c.sh, that sets up the basic structure for a C project. It includes copying necessary files like .gitignore, Makefile, and header files, and creating a library folder for C source files.
- Sets up a
.gitignorefile. - Creates a
Makefile. - Creates an
includedirectory with header files. - Creates a
lib/mydirectory for your C library files. - Automatically commits and pushes the changes to your Git repository.
- Clone this repository or download the script.
- Ensure the necessary source files exist in
~/Documents/git-init-c/(everything but .sh). - Move the .sh file to a folder on your computer and name it
~/my_scripts/git-init-c.sh - Run the script:
./git-init-c.sh
- The project structure will be created, and the changes will be committed and pushed to your Git repository.
- Bash shell
- Git installed
- Create dir ~/my_scripts/ (for .sh)
- Create dir ~/Documents/git-init-c/ (for base repo)