[pkg-fso-commits] [SCM] Various non-packaged files branch, master, updated. 7b0f88d99a6992e1b21841511e7a8e60c10bf99a
Luca Capello
luca at pca.it
Sun Aug 24 21:42:22 UTC 2008
The following commit has been merged in the master branch:
commit 7b0f88d99a6992e1b21841511e7a8e60c10bf99a
Author: Luca Capello <luca at pca.it>
Date: Sun Aug 24 23:42:15 2008 +0200
install.sh: move functions after variables
diff --git a/install.sh b/install.sh
index b8f68a3..be1b1bf 100755
--- a/install.sh
+++ b/install.sh
@@ -65,6 +65,48 @@ UBOOT_ENV_SIZE=262144
DOSFSTOOLS_PACKAGE=$INST_MIRROR/pool/main/d/dosfstools/dosfstools_2.11-6_armel.deb
+#
+# FUNCTIONS
+#
+
+umount_all () {
+ for I in $(seq 0 9); do
+ if mount | grep -q ^${SD_DEVICE}p$I; then
+ echo "W: ${SD_DEVICE}p$I is mounted, unmounting"
+ umount ${SD_DEVICE}p$I
+ if mount | grep -q ^${SD_DEVICE}p$I; then
+ echo "E: Unmount failed"
+ exit 1
+ fi
+ fi
+ done
+}
+
+card_data_warning() {
+cat <<__END__
+Starting to $1 the microSD card
+
+***********
+* WARNING *
+***********
+
+This will destroy all the data on the microSD card!!!
+
+Press any key within 5 seconds to quit
+__END__
+
+ # since dash doesn't support 'read' -t and -n options, this script
+ # should be executed only by /bin/bash. However, all official
+ # Openmoko images use busybox, which doesn't provide /bin/bash
+ read -t 5 -n 1 VAR || VAR=continue
+ if [ "$VAR" != "continue" ]; then
+ echo "E: aborting on user request"
+ exit 1
+ fi
+
+}
+
+
if [ $# -eq 0 ]; then
#
# Usage
@@ -156,44 +198,6 @@ fi
# let's the fun start!
echo "Running stage $1"
-
-umount_all () {
- for I in $(seq 0 9); do
- if mount | grep -q ^${SD_DEVICE}p$I; then
- echo "W: ${SD_DEVICE}p$I is mounted, unmounting"
- umount ${SD_DEVICE}p$I
- if mount | grep -q ^${SD_DEVICE}p$I; then
- echo "E: Unmount failed"
- exit 1
- fi
- fi
- done
-}
-
-card_data_warning() {
-cat <<__END__
-Starting to $1 the microSD card
-
-***********
-* WARNING *
-***********
-
-This will destroy all the data on the microSD card!!!
-
-Press any key within 5 seconds to quit
-__END__
-
- # since dash doesn't support 'read' -t and -n options, this script
- # should be executed only by /bin/bash. However, all official
- # Openmoko images use busybox, which doesn't provide /bin/bash
- read -t 5 -n 1 VAR || VAR=continue
- if [ "$VAR" != "continue" ]; then
- echo "E: aborting on user request"
- exit 1
- fi
-
-}
-
case $1 in
all)
#
--
Various non-packaged files
More information about the pkg-fso-commits
mailing list