-
Notifications
You must be signed in to change notification settings - Fork 1
/
lab.sh
63 lines (45 loc) · 1.16 KB
/
lab.sh
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/bash
## ⬇ GIT SETUP ⬇ ##
# get repo name
echo "Enter the name of the git repository you wish to create: "
read repo_name
# get gitlab user
echo "Enter your gitlab username: "
read gitlab_user
# create and cd to folder
mkdir $repo_name
cd $repo_name
# create local repo
git init
# create main immediately
git checkout -b main
# create README.md
echo \#$repo_name > README.md
git add .
git commit -m "chore: README"
# download and add .gitignore
curl "https://www.toptal.com/developers/gitignore/api/flask" -o .gitignore
git add .
git commit -m "chore: .gitgnore"
# create remote repo
git remote add origin https://gitlab.com/$gitlab_user/$repo_name
# push and link branches
git push -u origin main
# create and switch to dev branch
git checkout -b dev
## ⬇ PYTHON SETUP ⬇ ##
# create virtual environment
python -m venv .venv
# activate virtual environment
source .venv/Scripts/activate
# install flask
pip install flask
# create requirements.txt
pip freeze > requirements.txt
# push setup and conclude setup
git add .
git commit -m "chore: deps"
git push --set-upstream origin dev
# open vscode
code .
echo "Made by dxxxxy#0776, go ahead and have fun :)"