|
@@ -168,39 +168,7 @@ function create_pelican_publish_conf {
|
168
|
168
|
echo 'DELETE_OUTPUT_DIRECTORY = True' >> $STATIC_BLOG_FILE
|
169
|
169
|
}
|
170
|
170
|
|
171
|
|
-function mesh_install_blogstatic {
|
172
|
|
- if [[ $VARIANT != "meshclient" && $VARIANT != "meshusb" && $VARIANT != "usb" ]]; then
|
173
|
|
- return
|
174
|
|
- fi
|
175
|
|
-
|
176
|
|
- chroot "$rootdir" apt-get -y install python-pip
|
177
|
|
- chroot "$rootdir" pip install ipython
|
178
|
|
- chroot "$rootdir" pip install Markdown
|
179
|
|
- chroot "$rootdir" pip install typogrify
|
180
|
|
- chroot "$rootdir" pip install pelican
|
181
|
|
-
|
182
|
|
- STATIC_BLOG_INSTALL_DIR=/home/$MY_USERNAME/CreateBlog
|
183
|
|
- STATIC_BLOG_PATH=/home/$MY_USERNAME/Public/Blog
|
184
|
|
-
|
185
|
|
- if [ ! -d $rootdir$STATIC_BLOG_INSTALL_DIR ]; then
|
186
|
|
- mkdir -p $rootdir$STATIC_BLOG_INSTALL_DIR
|
187
|
|
- fi
|
188
|
|
-
|
189
|
|
- if [ ! -d $rootdir$STATIC_BLOG_PATH ]; then
|
190
|
|
- mkdir -p $rootdir$STATIC_BLOG_PATH
|
191
|
|
- fi
|
192
|
|
-
|
193
|
|
- if [ ! -d $rootdir$STATIC_BLOG_INSTALL_DIR/content/images ]; then
|
194
|
|
- mkdir -p $rootdir$STATIC_BLOG_INSTALL_DIR/content/images
|
195
|
|
- fi
|
196
|
|
-
|
197
|
|
- create_pelican_conf $rootdir$STATIC_BLOG_INSTALL_DIR/pelicanconf.py
|
198
|
|
- create_pelican_makefile $rootdir$STATIC_BLOG_INSTALL_DIR/Makefile
|
199
|
|
- create_pelican_publish_conf $rootdir$STATIC_BLOG_INSTALL_DIR/publishconf.py
|
200
|
|
-
|
201
|
|
- mkdir -p $rootdir$STATIC_BLOG_INSTALL_DIR/themes
|
202
|
|
- cd $rootdir$STATIC_BLOG_INSTALL_DIR/themes
|
203
|
|
-
|
|
171
|
+function blogstatic_themes {
|
204
|
172
|
# Clone themes separately because the themes repo sometimes has bad refs
|
205
|
173
|
git clone https://github.com/KenMercusLai/BT3-Flat
|
206
|
174
|
git clone https://github.com/abr4xas/Casper2Pelican
|
|
@@ -273,6 +241,41 @@ function mesh_install_blogstatic {
|
273
|
241
|
git clone https://github.com/samael500/w3-personal-blog
|
274
|
242
|
git clone https://github.com/jarv/water-iris
|
275
|
243
|
git clone https://github.com/kplaube/yapeme
|
|
244
|
+}
|
|
245
|
+
|
|
246
|
+function mesh_install_blogstatic {
|
|
247
|
+ if [[ $VARIANT != "meshclient" && $VARIANT != "meshusb" && $VARIANT != "usb" ]]; then
|
|
248
|
+ return
|
|
249
|
+ fi
|
|
250
|
+
|
|
251
|
+ chroot "$rootdir" apt-get -y install python-pip
|
|
252
|
+ chroot "$rootdir" pip install ipython
|
|
253
|
+ chroot "$rootdir" pip install Markdown
|
|
254
|
+ chroot "$rootdir" pip install typogrify
|
|
255
|
+ chroot "$rootdir" pip install pelican
|
|
256
|
+
|
|
257
|
+ STATIC_BLOG_INSTALL_DIR=/home/$MY_USERNAME/CreateBlog
|
|
258
|
+ STATIC_BLOG_PATH=/home/$MY_USERNAME/Public/Blog
|
|
259
|
+
|
|
260
|
+ if [ ! -d $rootdir$STATIC_BLOG_INSTALL_DIR ]; then
|
|
261
|
+ mkdir -p $rootdir$STATIC_BLOG_INSTALL_DIR
|
|
262
|
+ fi
|
|
263
|
+
|
|
264
|
+ if [ ! -d $rootdir$STATIC_BLOG_PATH ]; then
|
|
265
|
+ mkdir -p $rootdir$STATIC_BLOG_PATH
|
|
266
|
+ fi
|
|
267
|
+
|
|
268
|
+ if [ ! -d $rootdir$STATIC_BLOG_INSTALL_DIR/content/images ]; then
|
|
269
|
+ mkdir -p $rootdir$STATIC_BLOG_INSTALL_DIR/content/images
|
|
270
|
+ fi
|
|
271
|
+
|
|
272
|
+ create_pelican_conf $rootdir$STATIC_BLOG_INSTALL_DIR/pelicanconf.py
|
|
273
|
+ create_pelican_makefile $rootdir$STATIC_BLOG_INSTALL_DIR/Makefile
|
|
274
|
+ create_pelican_publish_conf $rootdir$STATIC_BLOG_INSTALL_DIR/publishconf.py
|
|
275
|
+
|
|
276
|
+ mkdir -p $rootdir$STATIC_BLOG_INSTALL_DIR/themes
|
|
277
|
+ cd $rootdir$STATIC_BLOG_INSTALL_DIR/themes
|
|
278
|
+ blogstatic_themes
|
276
|
279
|
|
277
|
280
|
#git clone --recursive $PELICAN_PLUGINS_REPO $rootdir$STATIC_BLOG_INSTALL_DIR/plugins
|
278
|
281
|
|
|
@@ -315,8 +318,11 @@ function install_blogstatic {
|
315
|
318
|
create_pelican_makefile $STATIC_BLOG_INSTALL_DIR/Makefile
|
316
|
319
|
create_pelican_publish_conf $STATIC_BLOG_INSTALL_DIR/publishconf.py
|
317
|
320
|
|
318
|
|
- git clone --recursive $PELICAN_THEMES_REPO $STATIC_BLOG_INSTALL_DIR/themes
|
319
|
|
- git clone --recursive $PELICAN_PLUGINS_REPO $STATIC_BLOG_INSTALL_DIR/plugins
|
|
321
|
+ mkdir -p $PELICAN_THEMES_REPO $STATIC_BLOG_INSTALL_DIR/themes
|
|
322
|
+ cd $PELICAN_THEMES_REPO $STATIC_BLOG_INSTALL_DIR/themes
|
|
323
|
+ blogstatic_themes
|
|
324
|
+
|
|
325
|
+ #git clone --recursive $PELICAN_PLUGINS_REPO $STATIC_BLOG_INSTALL_DIR/plugins
|
320
|
326
|
|
321
|
327
|
chown -R $MY_USERNAME:$MY_USERNAME $STATIC_BLOG_INSTALL_DIR
|
322
|
328
|
chown -R www-data:www-data $STATIC_BLOG_PATH
|