View | Details | Raw Unified | Return to bug 19858 | Differences between
and this patch

Collapse All | Expand All

(-)mergemaster.sh (-7 / +14 lines)
Lines 252-266 Link Here
252
#
252
#
253
case "${DONT_CHECK_PAGER}" in
253
case "${DONT_CHECK_PAGER}" in
254
'')
254
'')
255
  while [ "${PAGER}" != "more" -a -n "${PAGER}" -a ! -x "${PAGER%% *}" ]; do
255
  while ! type "${PAGER%% *}" >/dev/null && [ -n "${PAGER}" ]; do
256
    echo " *** Your PAGER environment variable specifies '${PAGER}', but"
256
    echo " *** Your PAGER environment variable specifies '${PAGER}', but"
257
    echo "     I cannot execute it. In general it is good practice to"
257
    echo "     due to the limited PATH that I use for security reasons,"
258
    echo "     specify the full path for environment variables like"
258
    echo "     I cannot execute it. So, what would you like to do?"
259
    echo "     PAGER and EDITOR. Meanwhile, what would you like to do?"
260
    echo ''
259
    echo ''
261
    echo "  Use 'e' to exit mergemaster and fix your PAGER variable"
260
    echo "  Use 'e' to exit mergemaster and fix your PAGER variable"
262
    if [ -x /usr/local/bin/less ]; then
261
    if [ -x /usr/bin/less -o -x /usr/local/bin/less ]; then
263
    echo "  Use 'l' to set PAGER to /usr/local/bin/less for this run"
262
    echo "  Use 'l' to set PAGER to 'less' for this run"
264
    fi
263
    fi
265
    echo "  Use 'm' to use plain old 'more' as your PAGER for this run"
264
    echo "  Use 'm' to use plain old 'more' as your PAGER for this run"
266
    echo ''
265
    echo ''
Lines 272-279 Link Here
272
       exit 0
271
       exit 0
273
       ;;
272
       ;;
274
    [lL])
273
    [lL])
275
       if [ -x /usr/local/bin/less ]; then
274
       if [ -x /usr/bin/less ]; then
275
         PAGER=/usr/bin/less
276
       elif [ -x /usr/local/bin/less ]; then
276
         PAGER=/usr/local/bin/less
277
         PAGER=/usr/local/bin/less
278
       else
279
         echo ''
280
         echo " *** Fatal Error:"
281
         echo "     You asked to use 'less' as your pager, but I can't"
282
         echo "     find it in /usr/bin or /usr/local/bin"
283
         exit 1
277
       fi
284
       fi
278
       ;;
285
       ;;
279
    [mM]|'')
286
    [mM]|'')

Return to bug 19858