Fix static creation in install_dev
authorMichael M Slusarz <slusarz@curecanti.org>
Mon, 6 Dec 2010 20:03:05 +0000 (13:03 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Mon, 6 Dec 2010 20:21:23 +0000 (13:21 -0700)
framework/bin/install_dev

index f2f78af..fa17a86 100755 (executable)
@@ -149,7 +149,17 @@ foreach (new DirectoryIterator($horde_git . '/horde') as $it) {
     }
 }
 
-chmod($web_dir . '/static', $static_mode);
+if (file_exists($web_dir . '/static')) {
+    echo 'Setting static directory permissions...';
+    chmod($web_dir . '/static', $static_mode);
+} else {
+    echo 'Creating static directory...';
+    mkdir($web_dir . '/static', $static_mode);
+}
+
+if ($static_group) {
+    chgrp($web_dir . '/static', $static_group);
+}
 
 print "\nLINKING framework\n";
 mkdir($web_dir . '/libs');