Skip to content
Snippets Groups Projects
Unverified Commit a3fd4c40 authored by Bob Mottram's avatar Bob Mottram
Browse files

Tidying

parent e8cf91de
No related branches found
No related tags found
No related merge requests found
......@@ -171,45 +171,36 @@ function mesh_install_blogstatic {
return
fi
if [ ! -d $rootdir/home/$MY_USERNAME/Public/Blog ]; then
mkdir -p $rootdir/home/$MY_USERNAME/Public/Blog
chroot "$rootdir" chown -R $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/Public
fi
STATIC_BLOG_INSTALL_DIR=/home/$MY_USERNAME/CreateBlog
STATIC_BLOG_PATH=/home/$MY_USERNAME/Public/Blog
chroot "$rootdir" apt-get -y install python-pip
chroot "$rootdir" pip install ipython
chroot "$rootdir" pip install Markdown
chroot "$rootdir" pip install typogrify
chroot "$rootdir" pip install pelican
STATIC_BLOG_INSTALL_DIR=/home/$MY_USERNAME/CreateBlog
STATIC_BLOG_PATH=/home/$MY_USERNAME/Public/Blog
if [ ! -d $rootdir$STATIC_BLOG_INSTALL_DIR ]; then
mkdir -p $rootdir$STATIC_BLOG_INSTALL_DIR
fi
if [ ! -d $rootdir$STATIC_BLOG_INSTALL_DIR/content ]; then
mkdir -p $rootdir$STATIC_BLOG_INSTALL_DIR/content
fi
if [ ! -d $rootdir$STATIC_BLOG_PATH ]; then
mkdir -p $rootdir$STATIC_BLOG_PATH
fi
STATIC_BLOG_FILE=$rootdir$STATIC_BLOG_INSTALL_DIR/pelicanconf.py
create_pelican_conf $STATIC_BLOG_FILE
STATIC_BLOG_FILE=$rootdir$STATIC_BLOG_INSTALL_DIR/Makefile
create_pelican_makefile $STATIC_BLOG_FILE
if [ ! -d $rootdir$STATIC_BLOG_INSTALL_DIR/content ]; then
mkdir -p $rootdir$STATIC_BLOG_INSTALL_DIR/content
fi
STATIC_BLOG_FILE=$rootdir$STATIC_BLOG_INSTALL_DIR/publishconf.py
create_pelican_publish_conf $STATIC_BLOG_FILE
create_pelican_conf $rootdir$STATIC_BLOG_INSTALL_DIR/pelicanconf.py
create_pelican_makefile $rootdir$STATIC_BLOG_INSTALL_DIR/Makefile
create_pelican_publish_conf $STATIC_BLOG_INSTALL_DIR/publishconf.py
git clone --recursive $PELICAN_THEMES_REPO $rootdir$STATIC_BLOG_INSTALL_DIR/themes
git clone --recursive $PELICAN_PLUGINS_REPO $rootdir$STATIC_BLOG_INSTALL_DIR/plugins
chroot "$rootdir" chown -R $MY_USERNAME:$MY_USERNAME $STATIC_BLOG_INSTALL_DIR
chroot "$rootdir" chown -R $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/Public
}
function install_blogstatic {
......@@ -222,40 +213,36 @@ function install_blogstatic {
return
fi
STATIC_BLOG_INSTALL_DIR=/etc/blog
STATIC_BLOG_PATH=/var/www/$STATIC_BLOG_DOMAIN/htdocs
apt-get -y install python-pip
pip install ipython
pip install Markdown
pip install typogrify
pip install pelican
STATIC_BLOG_INSTALL_DIR=/etc/blog
STATIC_BLOG_PATH=/var/www/$STATIC_BLOG_DOMAIN/htdocs
if [ ! -d $STATIC_BLOG_INSTALL_DIR ]; then
mkdir -p $STATIC_BLOG_INSTALL_DIR
fi
if [ ! -d $STATIC_BLOG_INSTALL_DIR/content ]; then
mkdir -p $STATIC_BLOG_INSTALL_DIR/content
fi
if [ ! -d $STATIC_BLOG_PATH ]; then
mkdir -p $STATIC_BLOG_PATH
fi
STATIC_BLOG_FILE=$STATIC_BLOG_INSTALL_DIR/pelicanconf.py
create_pelican_conf $STATIC_BLOG_FILE
STATIC_BLOG_FILE=$STATIC_BLOG_INSTALL_DIR/Makefile
create_pelican_makefile $STATIC_BLOG_FILE
if [ ! -d $STATIC_BLOG_INSTALL_DIR/content ]; then
mkdir -p $STATIC_BLOG_INSTALL_DIR/content
fi
STATIC_BLOG_FILE=$STATIC_BLOG_INSTALL_DIR/publishconf.py
create_pelican_publish_conf $STATIC_BLOG_FILE
create_pelican_conf $STATIC_BLOG_INSTALL_DIR/pelicanconf.py
create_pelican_makefile $STATIC_BLOG_INSTALL_DIR/Makefile
create_pelican_publish_conf $STATIC_BLOG_INSTALL_DIR/publishconf.py
git clone --recursive $PELICAN_THEMES_REPO $STATIC_BLOG_INSTALL_DIR/themes
git clone --recursive $PELICAN_PLUGINS_REPO $STATIC_BLOG_INSTALL_DIR/plugins
chown -R $MY_USERNAME:$MY_USERNAME $STATIC_BLOG_INSTALL_DIR
chown -R www-data:www-data $STATIC_BLOG_PATH
echo 'install_blogstatic' >> $COMPLETION_FILE
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment