Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@vitorbritto
Created July 6, 2016 12:30
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vitorbritto/6b15be753a04e09c6fa697e724d24ade to your computer and use it in GitHub Desktop.
Save vitorbritto/6b15be753a04e09c6fa697e724d24ade to your computer and use it in GitHub Desktop.
Scaffolding for a new project using Shell Script
#!/bin/bash
#
 # Programa: scaffolding.sh
 # Autor: Vitor Britto
 #
 # Descrição:
 # Este script será responsável pela criação
 # de uma estrutura para novos projetos.
 #
 # Uso: chmod u+x scaffolding.sh && ./scaffolding.sh
 #
# Declarando as variáveis
 FILES=”index.html robots.txt humans.txt .editorconfig assets/styles/style.css assets/scripts/main.js”
 PATHS=”assets/scripts assets/styles assets/images assets/fonts”
# Iniciando a interação com o usuário
 echo -n “→ Digite o nome do projeto (sem espaços): “
 read PROJECT
# Criando estrutura do projeto
 echo -e “→ Criando Estrutura”
mkdir -p $PROJECT && cd $_
 mkdir -p $PATHS
 touch $FILES
# Mensagem final
 echo -e “\n✔ Processo finalizado!\n”
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment