Skip to content
Browse files

Allow override of profilename to support domain with 'odd' characters…

… in the name, as well as adding a relink hook
  • Loading branch information...
1 parent 470c2c4 commit fcabc28602addfa9c12de26feae779aadcd3790a @letharion committed Mar 10, 2012
Showing with 7 additions and 4 deletions.
  1. +3 −0 base_functions.sh
  2. +4 −4 build.sh
View
3 base_functions.sh
@@ -16,6 +16,9 @@ KEEPNS=false;
NS="nodestream";
NSPROFILE="profiles/nodestream";
FULLDOMAIN="${DOMAIN}.${TOPDOMAIN}";
+if [ ! $PROFILENAME ]; then
+ PROFILENAME=${DOMAIN}
+fi
while getopts ":n" opt; do
case $opt in
View
8 build.sh
@@ -1,14 +1,14 @@
-#!/bin/bash
+#!/bin/bash -x
source build/base_functions.sh
run_cmd "mkdir -p ${NEWWEB}";
run_cmd "mkdir sites; mkdir profiles" "${NEWWEB}";
run_cmd "ln -s ../../${FULLDOMAIN} ." "${NEWWEB}/sites";
-run_cmd "ln -s ../../${DOMAIN}_profile ${DOMAIN}" "${NEWWEB}/profiles";
+run_cmd "ln -s ../../${PROFILENAME}_profile ${PROFILENAME}" "${NEWWEB}/profiles";
-run_hooked_cmd "profile_make" "drush -y make --working-copy profiles/${DOMAIN}/${DOMAIN}.make" "${NEWWEB}";
+run_hooked_cmd "profile_make" "drush -y make --working-copy profiles/${PROFILENAME}/${PROFILENAME}.make" "${NEWWEB}";
if ${KEEPNS}; then
run_cmd "cp -r ${OLDWEB}/profiles/${NS} ${NEWWEB}/profiles/${NS}";
@@ -19,7 +19,7 @@ else
run_hooked_cmd "nodestream_make" "drush -y make --no-core --contrib-destination=. drupal-org.make" "${NEWWEB}/profiles/nodestream";
fi
-ask "Do you want to move the web/ symlink from ${OLDWEB} to ${NEWWEB}" "ln -sfn \"${NEWWEB}\" web";
+ask "Do you want to move the web/ symlink from ${OLDWEB} to ${NEWWEB}" "run_hooked_cmd \"relink\" \"ln -sfn \\\"${NEWWEB}\\\" web\"";
ask "Do you want to remove the directory ${OLDWEB} and all its contents" "rm -rf ${OLDWEB}";

0 comments on commit fcabc28

Please sign in to comment.
Something went wrong with that request. Please try again.