changeset 40:788bad9a710e

improved comments and help message
author Volker Grabsch <vog@notjusthosting.com>
date Sun, 01 Jul 2007 12:39:55 +0200
parents 383b2c78d1a5
children 8d6c0d2c8e40
files build_mingw_cross_env.sh
diffstat 1 files changed, 24 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/build_mingw_cross_env.sh	Sun Jul 01 10:55:44 2007 +0200
+++ b/build_mingw_cross_env.sh	Sun Jul 01 12:39:55 2007 +0200
@@ -3,19 +3,34 @@
 
 
 #---
-#   Build a MinGW cross compiling environment
+#   MinGW cross compiling environment  (pre-1.1)
+#   =================================
 #
-#   Version:    -
-#   Homepage:   http://www.profv.de/mingw_cross_env/
-#   File name:  build_mingw_cross_env.sh
+#   http://www.profv.de/mingw_cross_env/
 #
 #   This script compiles a MinGW cross compiler and cross compiles
 #   many free libraries such as GD and SDL. Thus, it provides you
 #   a nice MinGW cross compiling environment. All necessary source
 #   packages are downloaded automatically.
 #
-#   2007-06-12  Project start
-#   2007-06-19  Release 1.0
+#
+#   Usage:  ./build_mingw_cross_env.sh  [ action ]
+#
+#   <no action>
+#       same as '--download', followed by '--build'.
+#
+#   --new-versions
+#       retrieve the new version numbers of all packages
+#       (modifies the script in-place, use with caution!)
+#
+#   --download
+#       download all packages in download/
+#       (resumes incomplete downloads)
+#
+#   --build
+#       build the packages in src/ and usr/, create mingw_cross_env.tar.gz
+#       (needs a prepared download/ directory
+#        or a previous '--download' run)
 #---
 
 
@@ -104,9 +119,7 @@
 
 case "$1" in
 "")
-    echo "Stage 1: $BASH '$0' --download"
     $BASH "$0" --download
-    echo "Stage 2: $BASH '$0' --build"
     $BASH "$0" --build
     exit 0
     ;;
@@ -120,8 +133,10 @@
     # go ahead
     ;;
 *)
+    # display the first comments of this script as help message
     set - -x
-    echo "Usage: $0 [ --new-versions | --download | --build ]"
+    sed -n '/(c)/ Q; s/\(^$\|^#$\|^#   \)//p' "$0" |
+    more
     exit 1
     ;;
 esac