Created
October 4, 2021 13:31
-
-
Save Merle-Zhang/d09a893beebf31e09e7e60ea278d4095 to your computer and use it in GitHub Desktop.
Generate named project form the RedNoise template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Script to generate new project from the RedNoise template on Linux. | |
| # You need to put the RedNoise.zip at `./Template/RedNoise.zip` | |
| # How to use: | |
| # ./new.sh NameOfProject | |
| unzip ./Template/RedNoise.zip -d tmp | |
| mv ./tmp/RedNoise "./${1}" | |
| rm -r ./tmp | |
| sed -i "s/RedNoise/${1}/g" "./${1}/CMakeLists.txt" | |
| sed -i "s/RedNoise/${1}/g" "./${1}/Makefile" | |
| mv "./${1}/src/RedNoise.cpp" "./${1}/src/${1}.cpp" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment