Separate clones of static blog themes

This commit is contained in:
Bob Mottram 2016-09-10 19:23:49 +01:00
parent a98df56815
commit 604083e17a
No known key found for this signature in database
GPG Key ID: 0452CC7CEA982E38
1 changed files with 41 additions and 35 deletions

View File

@ -168,39 +168,7 @@ function create_pelican_publish_conf {
echo 'DELETE_OUTPUT_DIRECTORY = True' >> $STATIC_BLOG_FILE echo 'DELETE_OUTPUT_DIRECTORY = True' >> $STATIC_BLOG_FILE
} }
function mesh_install_blogstatic { function blogstatic_themes {
if [[ $VARIANT != "meshclient" && $VARIANT != "meshusb" && $VARIANT != "usb" ]]; then
return
fi
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_PATH ]; then
mkdir -p $rootdir$STATIC_BLOG_PATH
fi
if [ ! -d $rootdir$STATIC_BLOG_INSTALL_DIR/content/images ]; then
mkdir -p $rootdir$STATIC_BLOG_INSTALL_DIR/content/images
fi
create_pelican_conf $rootdir$STATIC_BLOG_INSTALL_DIR/pelicanconf.py
create_pelican_makefile $rootdir$STATIC_BLOG_INSTALL_DIR/Makefile
create_pelican_publish_conf $rootdir$STATIC_BLOG_INSTALL_DIR/publishconf.py
mkdir -p $rootdir$STATIC_BLOG_INSTALL_DIR/themes
cd $rootdir$STATIC_BLOG_INSTALL_DIR/themes
# Clone themes separately because the themes repo sometimes has bad refs # Clone themes separately because the themes repo sometimes has bad refs
git clone https://github.com/KenMercusLai/BT3-Flat git clone https://github.com/KenMercusLai/BT3-Flat
git clone https://github.com/abr4xas/Casper2Pelican git clone https://github.com/abr4xas/Casper2Pelican
@ -273,6 +241,41 @@ function mesh_install_blogstatic {
git clone https://github.com/samael500/w3-personal-blog git clone https://github.com/samael500/w3-personal-blog
git clone https://github.com/jarv/water-iris git clone https://github.com/jarv/water-iris
git clone https://github.com/kplaube/yapeme git clone https://github.com/kplaube/yapeme
}
function mesh_install_blogstatic {
if [[ $VARIANT != "meshclient" && $VARIANT != "meshusb" && $VARIANT != "usb" ]]; then
return
fi
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_PATH ]; then
mkdir -p $rootdir$STATIC_BLOG_PATH
fi
if [ ! -d $rootdir$STATIC_BLOG_INSTALL_DIR/content/images ]; then
mkdir -p $rootdir$STATIC_BLOG_INSTALL_DIR/content/images
fi
create_pelican_conf $rootdir$STATIC_BLOG_INSTALL_DIR/pelicanconf.py
create_pelican_makefile $rootdir$STATIC_BLOG_INSTALL_DIR/Makefile
create_pelican_publish_conf $rootdir$STATIC_BLOG_INSTALL_DIR/publishconf.py
mkdir -p $rootdir$STATIC_BLOG_INSTALL_DIR/themes
cd $rootdir$STATIC_BLOG_INSTALL_DIR/themes
blogstatic_themes
#git clone --recursive $PELICAN_PLUGINS_REPO $rootdir$STATIC_BLOG_INSTALL_DIR/plugins #git clone --recursive $PELICAN_PLUGINS_REPO $rootdir$STATIC_BLOG_INSTALL_DIR/plugins
@ -315,8 +318,11 @@ function install_blogstatic {
create_pelican_makefile $STATIC_BLOG_INSTALL_DIR/Makefile create_pelican_makefile $STATIC_BLOG_INSTALL_DIR/Makefile
create_pelican_publish_conf $STATIC_BLOG_INSTALL_DIR/publishconf.py create_pelican_publish_conf $STATIC_BLOG_INSTALL_DIR/publishconf.py
git clone --recursive $PELICAN_THEMES_REPO $STATIC_BLOG_INSTALL_DIR/themes mkdir -p $PELICAN_THEMES_REPO $STATIC_BLOG_INSTALL_DIR/themes
git clone --recursive $PELICAN_PLUGINS_REPO $STATIC_BLOG_INSTALL_DIR/plugins cd $PELICAN_THEMES_REPO $STATIC_BLOG_INSTALL_DIR/themes
blogstatic_themes
#git clone --recursive $PELICAN_PLUGINS_REPO $STATIC_BLOG_INSTALL_DIR/plugins
chown -R $MY_USERNAME:$MY_USERNAME $STATIC_BLOG_INSTALL_DIR chown -R $MY_USERNAME:$MY_USERNAME $STATIC_BLOG_INSTALL_DIR
chown -R www-data:www-data $STATIC_BLOG_PATH chown -R www-data:www-data $STATIC_BLOG_PATH