repo: janusweb
action: commit
revision: 
path_from: 
revision_from: e6255e7396a2a772ba574c670e4019daa4ccf2e5:
path_to: 
revision_to: 
git.thebackupbox.net
janusweb
git clone git://git.thebackupbox.net/janusweb
commit e6255e7396a2a772ba574c670e4019daa4ccf2e5
Author: James Baicoianu 
Date:   Mon May 30 02:29:33 2016 -0700

    Workaround for nodejs require() symlink problem

diff --git a/utils/init.sh b/utils/init.sh
index 72f81fa9cc0edab7850dab83a6f945a19497caad..
index ..1aafbe23e2d62643af9514b6b3eaa07dd2d8c419 100755
--- a/utils/init.sh
+++ b/utils/init.sh
@@ -11,13 +11,23 @@ for DEP in $DEPENDENCYPATHS; do
 done

 if [ ! -d elation ]; then
-  ln -s ${dependencies["elation"]}
+  ln -sf ${dependencies["elation"]}

   cd elation/components
-  ln -s ${dependencies["elation-engine"]} engine
-  ln -s ${dependencies["elation-share"]} share
-  ln -s ${dependencies["cyclone-physics"]} physics
-  ln -s ${dependencies["janusweb"]} janusweb
+  #ln -sf ${dependencies["elation-engine"]} engine
+  #ln -sf ${dependencies["elation-share"]} share
+  #ln -sf ${dependencies["cyclone-physics"]} physics
+  #ln -sf ${dependencies["janusweb"]} janusweb
+
+  # FIXME - nodejs require() seems to have problems with symlinked directories, use cp -al to create recursive hard links instead
+  cp -al ${dependencies["elation-engine"]} engine/
+  cp -al ${dependencies["elation-share"]} share/
+  cp -al ${dependencies["cyclone-physics"]} physics/
+
+  # special handling for root dir
+  DIR=${dependencies["janusweb"]}
+  mkdir janusweb
+  cp -al $DIR/css $DIR/scripts $DIR/media $DIR/utils janusweb/

   cd ..
   ./elation web init

-----END OF PAGE-----