Skip to content

Instantly share code, notes, and snippets.

@Merle-Zhang
Created October 4, 2021 13:31
Show Gist options
  • Select an option

  • Save Merle-Zhang/d09a893beebf31e09e7e60ea278d4095 to your computer and use it in GitHub Desktop.

Select an option

Save Merle-Zhang/d09a893beebf31e09e7e60ea278d4095 to your computer and use it in GitHub Desktop.
Generate named project form the RedNoise template
#!/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