Skip to content

Instantly share code, notes, and snippets.

@jyates
Created May 24, 2012 20:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jyates/2784108 to your computer and use it in GitHub Desktop.
Save jyates/2784108 to your computer and use it in GitHub Desktop.
Fix bin/hbase for my branch
diff --git a/bin/hbase b/bin/hbase
index 126052b..caf9eef 100755
--- a/bin/hbase
+++ b/bin/hbase
@@ -124,6 +124,7 @@ if [ "$HBASE_HEAPSIZE" != "" ]; then
fi
# so that filenames w/ spaces are handled correctly in loops below
+ORIG_IFS=$IFS
IFS=
# CLASSPATH initially contains $HBASE_CONF_DIR
@@ -142,20 +143,18 @@ add_maven_deps_to_classpath() {
CLASSPATH=${CLASSPATH}:`cat "${f}"`
}
-add_maven_module_main_classes_to_classpath(){
- #assumes the each module is by name under hbase/
- for $module in $@; do
+
+add_maven_main_classes_to_classpath() {
+ # assumes all modules are named hbase-* in the top level directory
+ IFS=$ORIG_IFS
+ for module in `ls $HBASE_HOME | grep 'hbase-*'`
+ do
if [ -d "$HBASE_HOME/$module/target/classes" ]; then
CLASSPATH=${CLASSPATH}:$HBASE_HOME/$module/target/classes
fi
done
}
-add_maven_main_classes_to_classpath() {
- #new modules need ot e added here as well
- add_maven_module_main_classes_to_classpath "hbase-server"
-}
-
add_maven_test_classes_to_classpath() {
# For developers, add hbase classes to CLASSPATH
f="$HBASE_HOME/target/test-classes"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment