This commit is contained in:
Bob Mottram 2016-09-08 09:35:53 +01:00
parent e8cf91de27
commit a3fd4c4043
No known key found for this signature in database
GPG Key ID: 0452CC7CEA982E38
1 changed files with 20 additions and 33 deletions

View File

@ -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
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/Makefile
create_pelican_makefile $STATIC_BLOG_FILE
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
if [ ! -d $STATIC_BLOG_INSTALL_DIR/content ]; then
mkdir -p $STATIC_BLOG_INSTALL_DIR/content
fi
STATIC_BLOG_FILE=$STATIC_BLOG_INSTALL_DIR/Makefile
create_pelican_makefile $STATIC_BLOG_FILE
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
}