Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extra script to clone a gh-pages branch #9

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
1 change: 1 addition & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
All that's missing is the fork. Heh.
Binary file added forkit.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
63 changes: 63 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<!DOCTYPE html>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

<title>Spoon-Knife</title>
<style type="text/css">
* {
margin:0px;
padding:0px;
}

#octocat {
display: block;
width:384px;
margin: 50px auto;
}

p {
display: block;
width: 400px;
margin: 50px auto;
font: 30px Monaco,"Courier New","DejaVu Sans Mono","Bitstream Vera Sans Mono",monospace;
}
#rainbow-message {
position: absolute;
right: 10px;
top: 10px;
box-shadow: -5px 10px 15px gray;
-moz-box-shadow: -5px 10px 15px gray;
font-family: sans-serif;
}

</style>
<script type="text/javascript">
var keyCodes=new Array(10);
var pattern=[38,38,40,40,37,39,37,39,66,65];
function keydownHandler(e){
keyCodes.shift();
keyCodes.push(e.keyCode);
if(keyCodes.every(function(element, index, array){return element===pattern[index];})){
document.getElementById("rainbow-message").style.display="";
}
}
window.onkeydown=keydownHandler;
</script>

</head>

<body>

<img src="forkit.gif" id="octocat" alt="" />

<p>
Fork me? No, fork you!
</p>
<div id="rainbow-message" style="display:none">
Double repositories all the way across the sky!<br/>
<a href="http://help.github.com/fork-a-repo/">What does it mean?</a>
</div>
</body>
</html>
46 changes: 46 additions & 0 deletions util/create_ghpages.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/bin/sh

# Copyright (c) 2011, XMOS Ltd, All rights reserved
# This software is freely distributable under a derivative of the
# University of Illinois/NCSA Open Source License posted in
# LICENSE.txt and at <http://github.xcore.com/>

if [ $# -ne 1 ]
then
echo "Usage: $0 <reponame>"
exit 1
fi

mod=$1

if [ -e ${mod}_gh_pages ]
then
echo "${mod}_gh_pages already exists"
exit 1
fi

if [ ! -d ${mod} -o ! -d ${mod}/.git ]
then
echo "Repo ${mod} not checked out here - quitting"
exit 2
fi

echo "About to create empty documentation branch ${mod}_gh_pages"
echo "This is a clone of the ${mod} repository on branch gh-pages"
echo "Hit return or ^C"

read x

git clone [email protected]:xcore/${mod}.git ${mod}_gh_pages || exit 1

cd ${mod}_gh_pages || exit 1

git symbolic-ref HEAD refs/heads/gh-pages || exit 1
rm .git/index || exit 1
git clean -fdx || exit 1

touch .nojekyll
git add .nojekyll
git commit -a -m "First pages commit"

git push origin gh-pages