PROJECT="$1"
REPO="$2"
BOOTSTRAP="git://git.sarava.org/puppet-bootstrap.git"
+TEMPLATES="git://git.sarava.org/templates.git"
# Syntax check
if [ -z "$PROJECT" ]; then
)
fi
+# Ikiwiki integration
+(
+ if [ ! -d "$HOME/file/templates" ]; then
+ echo "Please clone $TEMPLATES into $HOME/file/templates"
+ else
+ echo ""
+ echo "Setting up ikiwiki integration..."
+ cd $CODE/$PROJECT
+ git checkout develop
+
+ cat $HOME/file/templates/ikiwiki/.gitignore >> .gitignore
+
+ if [ ! -e "index.mdwn" ]; then
+ cp $HOME/file/templates/ikiwiki/index.mdwn .
+ fi
+
+ if [ ! -e "Makefile" ]; then
+ cp $HOME/file/templates/ikiwiki/Makefile .
+ elif ! grep -q ^wiki: Makefile; then
+ grep -v '^#' $HOME/file/templates/ikiwiki/Makefile >> Makefile
+ fi
+
+ if [ ! -d "templates" ]; then
+ cp r $HOME/file/templates/ikiwiki/templates .
+ fi
+
+ if [ ! -d "bootstrap" ]; then
+ cp r $HOME/file/bootstrap/ikiwiki/bootstrap .
+ fi
+
+ git add .
+ git commit -a -m "Static site generation support using ikiwiki"
+ fi
+)
+
# Vagrant integration
(
echo ""
cd $CODE/$PROJECT
git checkout develop
echo '.vagrant' >> .gitignore
- git commit -a -m "Dev branch with vagrant support"
+ git commit -a -m "Adds vagrant support"
# Use the best approach
#git clone $BOOSTRAP $CODE/$PROJECT/puppet