Browse files

Update .openshift/action_hooks/build

added support for theme and plugins dir hosted on data dir
(perm destination, does not get wiped out on 'git push')
  • Loading branch information...
1 parent 671de01 commit 634088301dc9bbe07cdbfbed7ae054a4014cfef6 @mkdizajn mkdizajn committed with smarterclayton Sep 14, 2012
Showing with 15 additions and 2 deletions.
  1. +15 −2 .openshift/action_hooks/build
@@ -3,15 +3,28 @@
# available. Otherwise it will execute while your application is stopped
# before the deploy step. This script gets executed directly, so it
# could be python, php, ruby, etc.
if [ ! -d $OPENSHIFT_DATA_DIR/uploads ]; then
mkdir $OPENSHIFT_DATA_DIR/uploads
-ln -sf $OPENSHIFT_DATA_DIR/uploads $OPENSHIFT_REPO_DIR/php/wp-content/
+if [ ! -d $OPENSHIFT_DATA_DIR/plugins ]; then
+ mkdir $OPENSHIFT_DATA_DIR/plugins
+if [ ! -d $OPENSHIFT_DATA_DIR/themes ]; then
+ mkdir $OPENSHIFT_DATA_DIR/themes
# Add multisite upload dir
if [ ! -d $OPENSHIFT_DATA_DIR/blogs.dir ]; then
mkdir $OPENSHIFT_DATA_DIR/blogs.dir
ln -sf $OPENSHIFT_DATA_DIR/blogs.dir $OPENSHIFT_REPO_DIR/php/wp-content/
+ln -sf $OPENSHIFT_DATA_DIR/plugins $OPENSHIFT_REPO_DIR/php/wp-content/
+ln -sf $OPENSHIFT_DATA_DIR/themes $OPENSHIFT_REPO_DIR/php/wp-content/
+ln -sf $OPENSHIFT_DATA_DIR/uploads $OPENSHIFT_REPO_DIR/php/wp-content/
+echo "<?php ?>" > $OPENSHIFT_DATA_DIR/plugins
+echo "<?php ?>" > $OPENSHIFT_DATA_DIR/themes

5 comments on commit 6340883


npmccallum replied Feb 26, 2013

The major downside of this patch is that it forces the admin to manage plugins/themes through wordpress and not through git. I would far rather manage them through git.


smarterclayton replied Feb 26, 2013

You can still check them in - once you do that they override the symlinked (because the runtime dir already exists). So you can download plugins, get a set that works, then lock them into git.

Is it me or lines 11-17 conflicts with lines 29-30 ?


smarterclayton replied Mar 1, 2013

Lines 29 shouldn't be there - hrm, was this commit missed

Please sign in to comment.