Commits

Peter Szilagyi committed da24d6e

Require an installation message from the installer.

Comments (0)

Files changed (1)

 PATH=$PATH:/j/office/app/sink/prod/bin # sink
 
 mode=test
+message=
 # CR pszilagyi: Implement a general-purpose sink-args hook so I can
 # check "sink history list" very easily.
-for arg in "$@"; do
+while test $# -gt 0; do
+    arg=$1
+    shift
     case $arg in
         -prod)
             mode=prod
         -test)
             mode=test
             ;;
+        -message)
+            message=$1
+            shift
+            ;;
         *)
             echo "Unknown argument: $arg" >&2
-            echo "Usage: $0 [-prod | -test]" >&2
+            echo "Usage: $0 [-prod] -message M" >&2
             exit 2
             ;;
     esac
 done
 
+if [ -z "$message" ]; then
+    echo "$0: -message required" >&2
+    exit 3
+fi
+
 if [ $mode = "prod" ]; then
     test -t 1 -a -t 0
     echo "You are about to install a new PRODUCTION version of omake-emacs."
 # This has to be pretty narrow to look good in "sink history list".
 #
 # CR pszilagyi: Dump this in a file and have a short message.
-message="$(pwd):
+message+="
+$(pwd):
   $0 $*
 $(cd "$dot/".. && echo "$(pwd):
   $(hg paths default)