]> code.delx.au - gnu-emacs/blobdiff - admin/quick-install-emacs
* src/macfont.m (mac_font_shape): Make sure that total_advance is increasing.
[gnu-emacs] / admin / quick-install-emacs
index 911b39b4f60a30f99bef2529088d9f15797c8ef4..b1b3793aff077a686e6567763ba6b0235cc42c33 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 ### quick-install-emacs --- do a halfway-decent job of installing emacs quickly
 
-## Copyright (C) 2001-2015 Free Software Foundation, Inc.
+## Copyright (C) 2001-2016 Free Software Foundation, Inc.
 
 ## Author: Miles Bader <miles@gnu.org>
 
@@ -40,7 +40,7 @@ VERBOSE=''
 
 me="`basename $0`"
 
-# Install commands (if the user specifies the `--verbose' option, it is
+# Install commands (if the user specifies the '--verbose' option, it is
 # passed to these commands, so that feature only works if these commands
 # implement it too)
 LINK='cp -lf'
@@ -58,7 +58,7 @@ unset LANG LC_ALL LC_MESSAGES
 
 # Some messages
 USAGE="Usage: $me [OPTION...] BUILD_TREE [PREFIX]"
-TRY="Try "\`"$me --help' for more information."
+TRY="Try '$me --help' for more information."
 
 # Parse command-line options
 while :; do
@@ -93,7 +93,7 @@ Install emacs quickly
       --help                 display this help and exit
       --version              output version information and exit
 
-$me install emacs \`incrementally,' that is, it will
+$me install emacs "incrementally", that is, it will
 install only those files that have changed since the last time it was
 invoked, and remove any obsolete files from the installation
 directories.  It also uses hard-links into the source and build trees to
@@ -104,9 +104,9 @@ and build directories reside.
 
 Optionally, $me can also remove old versions of
 automatically generated files that are version-specific (such as the
-versioned emacs executables in the \`src' directory).
-The latter action is called \`pruning,' and
-can be enabled using the \`-p' or \`--prune' options.
+versioned emacs executables in the 'src' directory).
+The latter action is called "pruning", and
+can be enabled using the '-p' or '--prune' options.
 EOF
       exit 0
       ;;
@@ -121,11 +121,11 @@ EOF
     -[!-]?*)
       # split concatenated single-letter options apart
       FIRST="$1"; shift
-      set -- `echo $FIRST | sed 's/-\(.\)\(.*\)/-\1 -\2/'` "$@"
+      set -- `printf '%s\n' "$FIRST" | sed 's/-\(.\)\(.*\)/-\1 -\2/'` "$@"
       ;;
     -*)
-      echo 1>&2 "$me: unrecognized option "\`"$1'"
-      echo 1>&2 "$TRY"
+      printf '%s\n' >&2 "$me: unrecognized option '$1'"
+      printf '%s\n' >&2 "$TRY"
       exit 1
       ;;
     *)
@@ -140,17 +140,18 @@ case $# in
   1) BUILD="$1";;
   2) BUILD="$1"; prefix="$2";;
   *)
-    echo 1>&2 "$USAGE"
-    echo 1>&2 "$TRY"
+    printf '%s\n' >&2 "$USAGE"
+    printf '%s\n' >&2 "$TRY"
     exit 1
     ;;
 esac
 
 if test ! -d "$BUILD"; then
-  echo 1>&2 "$me: $BUILD: Build tree not found"
+  printf '%s\n' >&2 "$me: $BUILD: Build tree not found"
   exit 2
 elif test ! -r "$BUILD/config.status"; then
-  echo 1>&2 "$me: $BUILD: Not a proper build tree, config.status not found"
+  printf '%s\n' >&2 \
+    "$me: $BUILD: Not a proper build tree, config.status not found"
   exit 2
 fi
 
@@ -160,7 +161,8 @@ get_config_var ()
   { sed -n "s/^S[[]\"$1\"[]]=\"\([^\"]*\)\"/\1/p" $CONFIG_STATUS | sed q | grep ''; } ||
   { sed -n "s/^s\(.\)@$1@\1\(|#_!!_#|\)*\(.*\)\1.*$/\3/p" $CONFIG_STATUS | sed q | grep ''; } ||
   {
-    echo 1>&2 "$me: $1: Configuration variable not found in $CONFIG_STATUS"
+    printf '%s\n' >&2 \
+      "$me: $1: Configuration variable not found in $CONFIG_STATUS"
     exit 4
   }
 }
@@ -172,7 +174,7 @@ test x"$ARCH" = x && { ARCH="`get_config_var host`" || exit 4 ; }
 VERSION=`
   sed -n 's/^AC_INIT(emacs,[    ]*\([^  )]*\).*/\1/p' <$SRC/configure.ac
 ` || exit 4
-test -n "$VERSION" || { echo >&2 "$me: no version in configure.ac"; exit 4; }
+test -n "$VERSION" || { printf '%s\n' >&2 "$me: no version in configure.ac"; exit 4; }
 
 DST_SHARE="$prefix/share/emacs/$VERSION"
 DST_BIN="$prefix/bin"
@@ -209,7 +211,7 @@ maybe_mkdir "$DST_INFO"
 PRUNED=""
 if test x"$PRUNE" != xno; then
   for D in `ls -1t $BUILD/src/emacs-$VERSION.* | sed 1d`; do
-    echo $REMOVE_CMD $D
+    printf '%s\n' "$REMOVE_CMD $D"
     PRUNED="$PRUNED $D"
   done
 fi
@@ -219,7 +221,7 @@ test x"$PRUNE" = xonly && exit 0
 maybe_emit_copy ()
 {
   if test "$FORCE" = yes || ! cmp -s $1 $2; then
-    echo $LINK_CMD $1 $2
+    printf '%s\n' "$LINK_CMD $1 $2"
   fi
 }
 
@@ -240,7 +242,7 @@ for SUBDIR in lisp leim etc lib-src info; do
   # defaults
   SHARED=no
   FORCED=''
-  AVOID_PAT="`echo "($AVOID)" | tr ' ' '|'`"
+  AVOID_PAT="`printf '%s\n' "($AVOID)" | tr ' ' '|'`"
 
   # Set subdir-specific values
   case $SUBDIR in
@@ -255,7 +257,7 @@ for SUBDIR in lisp leim etc lib-src info; do
       ;;
     lib-src)
       DST="$DST_LIBEXEC"
-      AVOID_PAT="`echo "($AVOID ($PUBLIC_LIBSRC_BINARIES)\$)" | tr ' ' '|'`"
+      AVOID_PAT="`printf '%s\n' "($AVOID ($PUBLIC_LIBSRC_BINARIES)\$)" | tr ' ' '|'`"
       ;;
     info)
       DST="$DST_INFO"
@@ -267,10 +269,10 @@ for SUBDIR in lisp leim etc lib-src info; do
     if [ -d $PFX/$SUBDIR ]; then
       for DIR in `(cd $PFX/$SUBDIR; find . -type d -print | sed 's@^./@@')`; do
        if [ -d $DST/$DIR ]; then
-         echo Directory $DST/$DIR exists
+         printf '%s\n' "Directory $DST/$DIR exists"
        else
-         echo Directory $DST/$DIR non-existent
-         if [ "`echo $DIR | egrep -v "$AVOID_PAT"`" ]; then
+         printf '%s\n' "Directory $DST/$DIR non-existent"
+         if [ "`printf '%s\n' "$DIR" | grep -Ev "$AVOID_PAT"`" ]; then
            maybe_mkdir $DST/$DIR
          fi
        fi