Browse Source

[tools] Make ace commands compatible for Ubuntu

Romain Rigaux 10 years ago
parent
commit
8fd9aabbbe

+ 1 - 12
desktop/libs/notebook/src/notebook/management/commands/dbproxy_server.py

@@ -33,19 +33,8 @@ class Command(NoArgsCommand):
 
   def handle(self, *args, **kwargs):
     env = os.environ.copy()
-#../../../../../librdbms/java/bin/dbproxy
-    cmd = os.path.join(os.path.dirname(__file__), "..", "..", "..", "..", "..", "librdbms", "java", "bin", "dbproxy")
-
-#     classpath = env.get('CLASSPATH', '').split(os.pathsep)
-#     classpath += 
-
-    args = [
-      #"java",
-    ]
 
-#     args.extend(("-cp", os.pathsep.join(classpath)))
-
-#     args.append("com.cloudera.hue.livy.server.Main")
+    cmd = os.path.join(os.path.dirname(__file__), "..", "..", "..", "..", "..", "librdbms", "java", "bin", "dbproxy")
 
     LOG.info("Executing %r (%r) (%r)" % (args, args, env))
 

+ 8 - 0
tools/ace-editor/README-HUE

@@ -0,0 +1,8 @@
+For dev
+
+Install
+* nodejs
+* npm
+
+Then
+npm install

+ 8 - 1
tools/ace-editor/hue-ace.sh

@@ -15,9 +15,16 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+if hash node 2>/dev/null; then
+  NODE_BIN="node"
+else
+  # Ubuntu
+  NODE_BIN="nodejs"
+fi
+
 echo "Compiling and copying Ace Editor for Hue"
 rm -rf ../../desktop/core/src/desktop/static/desktop/js/ace/* || echo "Skipping removal of folder"
-node ./Makefile.dryice.js minimal --m --nc --s --target ../../desktop/core/src/desktop/static/desktop/js/ace/
+$NODE_BIN ./Makefile.dryice.js minimal --m --nc --s --target ../../desktop/core/src/desktop/static/desktop/js/ace/
 mv ../../desktop/core/src/desktop/static/desktop/js/ace/src-min-noconflict/* ../../desktop/core/src/desktop/static/desktop/js/ace/
 rmdir ../../desktop/core/src/desktop/static/desktop/js/ace/src-min-noconflict
 echo "Done!"