Skip to content

Instantly share code, notes, and snippets.

@daliborgogic daliborgogic/project.sh
Last active Jul 16, 2019

Embed
What would you like to do?
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

This comment has been minimized.

Copy link
Owner Author

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
You can’t perform that action at this time.