Last active
August 15, 2017 02:15
-
-
Save oleoneto/c9194b567066812e4d6d34dc94eb3827 to your computer and use it in GitHub Desktop.
Automating the creation of a new project site directory.
This file contains 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 | |
# Get name of the site directory | |
# Create index.html | |
# Create css, js, and img sub-directories | |
# Create css and js files inside the respective folders | |
# Usage: ./startsite.sh SITE_PROJECT_NAME | |
# Tradução [Português] | |
# SITE vai armazenar o nome do argumento passado por meio do terminal. Esse nome será o nome do directório. | |
# Depois de criar o directório, entrasse no mesmo para a criação das pastas necessárias: CSS, JS, and IMG... | |
# A seguir cria-se o ficheiro index.html | |
# Depois, criam-se os ficheiros css e javascript nas respectivas pastas. | |
# Fim... | |
# Como utilizar: ./startsite.sh NOME_DO_SITE | |
SITE=$1 | |
mkdir -p $SITE/css $SITE/js $SITE/img | |
cd $SITE | |
touch index.html | |
touch css/master.css | |
touch css/header.css | |
touch css/footer.css | |
touch js/master.js | |
touch js/functions.js | |
touch js/apis.js | |
echo "Project: $SITE created." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment