-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathfirst_setup.zsh
executable file
·77 lines (63 loc) · 1.81 KB
/
first_setup.zsh
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/usr/bin/env zsh -i
# Auto-generated by Voodoo
# First-time script for project setup (DELETE ME AFTER RUNNING!)
DOCS_DIR=~/dev/githubdocs
print Setting up your virtualenv
rmvirtualenv one_resume
if [ $? -ne 0 ]; then
print Removing old virtualenv failed
exit -1
fi
mkvirtualenv one_resume
if [ $? -ne 0 ]; then
print Making one_resume Virtual env failed
exit -1
fi
workon one_resume
if [ $? -ne 0 ]; then
print Could not switch to one_resume
exit -1
fi
print Working in virtualenv one_resume
# Set up the pip packages
#pip install pytest mock pytest-cov python-coveralls coverage sphinx tox
pip install sphinx
echo "cd ~/dev/one_resume" >> ~/dev/envs/one_resume/bin/postactivate
# Start python develop
python setup.py develop
# Initialize the git repo
github_remote='[email protected]:virantha/one_resume.git'
git init
git remote add origin $github_remote
git add .
git commit -am "Setting up new project one_resume"
# Prompt if we want to push to remote git
read -q "REPLY?Create remote repository at $github_remote [y/N]?"
if [[ $REPLY == y ]]; then
curl --data '{"name":"one_resume", "description":""}' --user "virantha" https://api.github.com/user/repos
fi
read -q "REPLY?Push to remote repository $github_remote [y/N]?"
if [[ $REPLY == y ]]; then
git push -u origin master
fi
print
# Create the docs repository
current_dir=`pwd`
read -q "REPLY?Create and push docs to $github_remote [y/N]?"
if [[ $REPLY == y ]]; then
# Go to the docs build dir, and check out our repo
cd $DOCS_DIR
git clone https://github.com/virantha/one_resume.git
cd one_resume
git checkout --orphan gh-pages
git rm -rf .
cd $current_dir/docs
pip install sphinx
make html
cd $DOCS_DIR
cd one_resume
touch .nojekyll
git add .
git commit -m "docs"
git push origin gh-pages
fi