Skip to content

Commit

Permalink
New script added to update himg repo & build its doc
Browse files Browse the repository at this point in the history
  • Loading branch information
aayush committed Nov 5, 2010
1 parent bd643d0 commit c4e480a
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
18 changes: 18 additions & 0 deletions himg-update.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#! /usr/bin/env python

import cgitb
cgitb.enable()

import subprocess

print "Content-type: text/plain"
print

cmd = 'sudo /bin/su git -c "/bin/sh update-himg-repo.sh"'
print "Running update script."
p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
output = p.stdout.read()
print " Done."
print "Output:"
print output
20 changes: 20 additions & 0 deletions update-himg-repo.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#! /usr/bin/env sh

set +e
echo "Running as:"
id
echo "Updating repository..."
cd /home/git/repositories/himg.git
git fetch origin +master:master
git update-server-info
echo " Done."
echo "Updating docs..."
cd /var/www2/himg/himg
export GIT_DIR=`pwd`/.git
/usr/bin/git reset --hard
/usr/bin/git clean -dfx
/usr/bin/git pull origin master
echo "Building doc ..."
cd doc
make html
echo "Done Building doc !"

0 comments on commit c4e480a

Please sign in to comment.