[haiku-commits] r36817 - haiku/trunk/data/bin

  • From: mattmadia@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 15 May 2010 05:55:58 +0200 (CEST)

Author: mmadia
Date: 2010-05-15 05:55:58 +0200 (Sat, 15 May 2010)
New Revision: 36817
Changeset: http://dev.haiku-os.org/changeset/36817/haiku

Modified:
   haiku/trunk/data/bin/installoptionalpackage
Log:
Replaces the commented disclaimer & usage with a variable declaration, which is
echo'd in DisplayUsage.  No functional change.


Modified: haiku/trunk/data/bin/installoptionalpackage
===================================================================
--- haiku/trunk/data/bin/installoptionalpackage 2010-05-15 02:05:45 UTC (rev 
36816)
+++ haiku/trunk/data/bin/installoptionalpackage 2010-05-15 03:55:58 UTC (rev 
36817)
@@ -13,17 +13,27 @@
 #      information, the user will be limited to the appropriate 
OptionalPackages
 #      that were available for that specific revision.
 #
-# Disclaimer:
-#   This is a temporary solution for installing OptionalPackages.
-#   In time, there will be an official package manager.
-#   See these URL's for info on the in-development package manager.
-#     http://dev.haiku-os.org/wiki/PackageManagerIdeas
-#     http://dev.haiku-os.org/wiki/PackageFormat
-#
-# Usage: ./installoptionalpackage [-l] [-a "<pkg> [<pkg> ...]"]
-# -l      List installable packages
-# -a      Add one or more packages and all dependencies
+DISCLAIMER="\
+Disclaimer:\n\
+  This is a temporary solution for installing OptionalPackages.\n\
+  In time, there will be an official package manager.\n\
+  See these URL's for information on the in-development package manager.\n\
+    http://dev.haiku-os.org/wiki/PackageManagerIdeas\n\
+    http://dev.haiku-os.org/wiki/PackageFormat\n\
+       "
 
+USAGE="\
+Usage: ./installoptionalpackage [<pkg> [<pkg> ...]]\n\
+  or   ./installoptionalpackage [-a|-s <pkg> [<pkg> ...]]\n\
+  or   ./installoptionalpackage [-f|-h|-l]\n\
+\n\
+Options:\n\
+-a     Add one or more packages and all dependencies\n\
+-s     Show the final list of packages that would be installed\n\
+-f     Remove cached data and list installable packages\n\
+-h     Print this help.\n\
+-l     List installable packages\n\
+       "
 
 declare -A availablePackages
 declare availablePackagesKeys=""
@@ -722,27 +732,8 @@
 
 function DisplayUsage()
 {
-       cat << EOF
-
-Disclaimer:
-  This is a temporary solution for installing OptionalPackages.
-  In time, there will be an official package manager.
-  See these URL's for information on the in-development package manager.
-    http://dev.haiku-os.org/wiki/PackageManagerIdeas
-    http://dev.haiku-os.org/wiki/PackageFormat
-
-Usage: ./installoptionalpackage [<pkg> [<pkg> ...]]
-  or   ./installoptionalpackage [-a|-s <pkg> [<pkg> ...]]
-  or   ./installoptionalpackage [-f|-h|-l]
-
-Options:
--a     Add one or more packages and all dependencies
--s     Show the final list of packages that would be installed
--f     Remove cached data and list installable packages
--h     Print this help.
--l     List installable packages
-
-EOF
+       echo -e "$DISCLAIMER"
+       echo -e "$USAGE"
 }
 
 


Other related posts:

  • » [haiku-commits] r36817 - haiku/trunk/data/bin - mattmadia