[Groonga-commit] droonga/droonga-engine at 5f3d7d7 [master] Handle errors

Back to archive index

YUKI Hiroshi null+****@clear*****
Mon Sep 29 14:56:47 JST 2014


YUKI Hiroshi	2014-09-29 14:56:47 +0900 (Mon, 29 Sep 2014)

  New Revision: 5f3d7d7b77f9e47eda273c8748992a5ecfd11368
  https://github.com/droonga/droonga-engine/commit/5f3d7d7b77f9e47eda273c8748992a5ecfd11368

  Message:
    Handle errors

  Modified files:
    install.sh

  Modified: install.sh (+12 -1)
===================================================================
--- install.sh    2014-09-29 14:49:57 +0900 (4404e0d)
+++ install.sh    2014-09-29 14:56:47 +0900 (c6ae49f)
@@ -134,6 +134,10 @@ setup_configuration_directory() {
 
   droonga-engine-configure --quiet \
     --host=$HOST
+  if [ $? -ne 0 ]; then
+    echo "ERROR: Failed to configure $NAME!"
+    exit 1
+  fi
 
   chown -R $USER:$GROUP $DROONGA_BASE_DIR
 }
@@ -322,7 +326,14 @@ install() {
   fi
 
   curl -o $TEMPDIR/functions.sh $(download_url "install/$PLATFORM/functions.sh")
-  source $TEMPDIR/functions.sh
+  if ! source $TEMPDIR/functions.sh; then
+    echo "ERROR: Failed to download post-installation script!"
+    exit 1
+  fi
+  if ! exist_command register_service; then
+    echo "ERROR: Downloaded post-installation script is broken!"
+    exit 1
+  fi
 
   prepare_user
 
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index