Skip to content

Instantly share code, notes, and snippets.

@daliborgogic
Last active July 16, 2019 21:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daliborgogic/fda7b6631c852931471dca75140c09a4 to your computer and use it in GitHub Desktop.
Save daliborgogic/fda7b6631c852931471dca75140c09a4 to your computer and use it in GitHub Desktop.
Project Folder Structure
#!/bin/bash
# Project Folder Structure
# /project_name
# /assets
# /fonts
# /img
# /source
# /.git
# index.js
# package.json
# /docs
# brif.docx
# invoice.pdf
mkdir $1 \
$1/assets \
$1/source \
$1/docs \
&& cd $1/source \
&& echo "# $1" >> README.md \
&& git init \
&& git add README.md \
&& git commit -m "first commit" \
&& curl \
-H "Authorization: token $3" \
--data '{"name": "$1", "private": true}' \
https://api.github.com/user/repos \
&& git remote add origin git@github.com:$2/$1.git \
&& git remote -v \
&& git push origin master
@daliborgogic
Copy link
Author

daliborgogic commented Jul 16, 2019

Usage

# Add execute permission
chmod -x project.sh
# Execute script
. ./project.sh [PROJECT_NAME] [USERNAME] [TOKEN]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment