aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeb Bacon <seb.bacon@gmail.com>2012-07-17 12:11:52 +0100
committerSeb Bacon <seb.bacon@gmail.com>2012-07-17 12:11:52 +0100
commit27bf048f6681deb4f09090907c6880ff2c5eadb1 (patch)
treee0adb9448e88152927d7f81a3f216d7e822f26a7
parent61c1966ac608468870f531e50289833c73722677 (diff)
Make the post-deploy script actually work, and for both incantations of theme installation
-rwxr-xr-xscript/rails-post-deploy18
1 files changed, 12 insertions, 6 deletions
diff --git a/script/rails-post-deploy b/script/rails-post-deploy
index 6100bb1d0..dd2e61877 100755
--- a/script/rails-post-deploy
+++ b/script/rails-post-deploy
@@ -82,12 +82,23 @@ fi
bundle install $bundle_install_options
+function run_post_install {
+ NAME=`echo $1 | sed -re 's/.*\/(.*)\.git.?/\1/'`
+ POST_INSTALL="vendor/plugins/$NAME/post_install.rb"
+ if [ -e $POST_INSTALL ]
+ then
+ echo "running post install script at $POST_INSTALL..."
+ script/runner $POST_INSTALL
+ fi
+}
+
if [ -n "$OPTION_THEME_URLS" ]
then
for THEME in "${OPTION_THEME_URLS[@]}"
do
echo "Installing $THEME..."
script/plugin install --force $THEME
+ run_post_install $THEME
done
fi
@@ -96,12 +107,7 @@ if [ -n "$OPTION_THEME_URL" ]
then
echo "Installing $OPTION_THEME_URL using deprecated THEME_URL..."
script/plugin install --force $OPTION_THEME_URL
- NAME=`sed -re 's/.*\/(.*)\.git.?/\1/'`
- POST_INSTALL="vendor/plugins/$NAME/post_install.rb"
- if [ -e $POST_INSTALL ]
- then
- script/runner $POST_INSTALL
- fi
+ run_post_install $OPTION_THEME_URL
fi
# upgrade database