[Lunar-commits] <moonbase-other> mysql: don't use `exit 1` in build files / use `false`

v4hn me at v4hn.de
Thu Aug 8 12:39:46 CEST 2013


commit 62541081f9a9bcb218540061ab74748716512429
Author: v4hn <me at v4hn.de>
Date: Thu, 08 Aug 2013 03:38:27 -0700
URL: https://github.com/lunar-linux/moonbase-other/commit/62541081f9a9bcb218540061ab74748716512429

mysql: don't use `exit 1` in build files / use `false`

On direct exit the lunar framework can't clean up properly.
---
  sql/mysql/PRE_BUILD | +10/-10   
  1 file changed, 10 insertions(+), 10 deletions(-)

--- a/sql/mysql/PRE_BUILD
+++ b/sql/mysql/PRE_BUILD
@@ -1,15 +1,15 @@
 if module_installed mysql; then
-   message " "
-   message " ${PROBLEM_COLOR}Warning! ${DEFAULT_COLOR}Database backup have to be done to avoid any data loss during migration."
-   message " "
+   message " " &&
+   message " ${PROBLEM_COLOR}Warning! ${DEFAULT_COLOR}Database backup have to be done to avoid any data loss during migration." &&
+   message " " &&
    if ! query "Have you done data backup (y/n)? " n; then
-      message " "
-      message " ${DEFAULT_COLOR}Please consult first http://dev.mysql.com/doc/refman/5.1/en/upgrade.html before installing."
-      message " "
-      sleep 5
-      exit 1
-   fi
+      message " " &&
+      message " ${DEFAULT_COLOR}Please consult first http://dev.mysql.com/doc/refman/5.1/en/upgrade.html before installing." &&
+      message " " &&
+      sleep 5 &&
+      false
+   fi &&
    message " "
-fi
+fi &&
 
 default_pre_build




More information about the Lunar-commits mailing list