-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathcreate.sh
More file actions
executable file
·40 lines (33 loc) · 795 Bytes
/
create.sh
File metadata and controls
executable file
·40 lines (33 loc) · 795 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
# $1 -> Contains project name.
# $2 -> Contains environment to put in .gitignore
echo "Setting Up," $1
python3 create.py $1 $2
echo "--------Repository Created ---------"
cd my-projects/
echo " "
echo "-------Setting up git locally------"
mkdir $1
cd $1
git init .
git remote add origin https://github.com/username/$1.git
touch README.md
touch .gitignore
# Storing repository's path
VAR1=$(pwd)
echo " "
echo "-------Initializing .gitignore--------"
# Going back to the root directory,
# to fetch from https://www.gitignore.io/api/
# and write it to .gitignore
cd ~
python3 create-gitignore.py $VAR1 $2
cd "$VAR1"
git add .
git commit -m "Initial commit"
git push -u origin master
echo " "
# echo "--------Finished---------"
echo " "
echo "Launching Vs code"
code .