clean up scripts
[busybox-power] / debian / busybox-power.preinst
index e8f4bab..52b7684 100644 (file)
@@ -4,30 +4,29 @@ test "$1" = install || exit 0 # upgrades are fine
 
 # Detect environment
 #if test ! -e /proc/component_version
-if test -d /scratchbox
-  then
-    echo "busybox-power: Scratchbox environment detected"
-    ENVIRONMENT="SDK"
-  else
-    PROD=$(cat /proc/component_version | grep product | cut -d" " -f 6)
-    case $PROD in
-      RX-51)
-        echo "busybox-power: Maemo (N900) environment detected"
-        ENVIRONMENT="N900"
-        ;;
-      *)
-        # Unsupported, use the least strict environment (SDK)
-        echo "busybox-power: unsupported environment, using SDK codepath.."
-        ENVIRONMENT="SDK"
+if test -d /scratchbox; then
+  echo "busybox-power: Scratchbox environment detected"
+  ENVIRONMENT="SDK"
+else
+  PROD=$(cat /proc/component_version | grep product | cut -d" " -f 6)
+  case $PROD in
+    RX-51)
+      echo "busybox-power: Maemo (N900) environment detected"
+      ENVIRONMENT="N900"
       ;;
-    esac
+    *)
+      # Unsupported, use the least strict environment (SDK)
+      echo "busybox-power: unsupported environment, using SDK codepath.."
+      ENVIRONMENT="SDK"
+      ;;
+  esac
 fi
 
 case $ENVIRONMENT in
   SDK)
     # Extra warning doesn't apply to SDK, just exit
     exit 0
-  ;;
+    ;;
   N900)
     f=/tmp/busybox-power-msg
     cat > $f <<EOF
@@ -37,10 +36,11 @@ Even though installation should be safe, a reflash might be required if somethin
 Files overwritten by this package:
 bin/busybox
 EOF
+    echo "Please confirm the text on the screen of your device"
     maemo-confirm-text "Installation notes" $f
     res=$?
     rm -f $f
     exit $res
-  ;;
+    ;;
 esac