-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathgit-to-github-io
More file actions
executable file
·37 lines (28 loc) · 899 Bytes
/
git-to-github-io
File metadata and controls
executable file
·37 lines (28 loc) · 899 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
#!/bin/bash
# this code adapted from
# http://stackoverflow.com/questions/1811730/how-do-you-work-with-a-git-repository-within-another-repository
# set my home directory
export HOME=/home/aaron
# where the github.io repo is cloned to
cd /home/aaron/git/github.io/
# set some git settings, since they may not be inherited
git config user.email "aaron@virginia.edu"
git config user.name "Aaron Bloomfield"
git config push.default simple
# pull the github.io repo
echo Pulling github.io...
git pull
/bin/echo
# update each submodule
echo Updating all the submodules...
git submodule update --recursive --remote
/bin/echo
# commit any changes
echo Commiting changes to the github.io repo...
git commit -a -m"Automated propagation of changes from a submodule to my github.io page"
/bin/echo
# push the updated github.io repo
echo Pushing changes to github...
git push
/bin/echo
echo "All done!"