Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Shebang - Tells Unix the file is executed by bin/bash
- #!/bin/bash
- # Template path with your project setup
- TEMPLATE_PATH="YOUR_PROJECT_PATH"
- function createTemplate() {
- echo "Beginning Template Creation..."
- # Navigate into the new directory
- cd "${1}"
- # Copy all files from template folder into the new folder
- cp -r "${TEMPLATE_PATH}\." "${PWD}"
- echo "Template Successfully Created."
- }
- # Create a new directory from the current directory into the new folder defined by user
- if [ -d "${PWD}/$1" ]; then
- echo "Folder Already Exists... Skipping"
- else
- echo "Creating Project Folder..."
- mkdir "${PWD}/$1"
- fi
- # Create the directory
- createTemplate "${PWD}/${1}"
- # Prevent Shell From Closing If Needed
- # $SHELL
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement