Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (c3c12e1970e13542961b0dee1f41f5a4f70f989e)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Jaka Kranjc <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (c3c12e1970e13542961b0dee1f41f5a4f70f989e)
  • Date: Thu, 30 Dec 2010 07:45:15 -0600

GIT changes to master sorcery by Jaka Kranjc <lynxlynxlynx AT sourcemage.org>:

ChangeLog | 1 +
etc/sorcery/config | 8 +-------
var/lib/sorcery/modules/libsorcery | 31 +++++++++++++++++++++++++++++++
3 files changed, 33 insertions(+), 7 deletions(-)

New commits:
commit c3c12e1970e13542961b0dee1f41f5a4f70f989e
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>

config, libsorcery: be a bit more smart about setting the pager #15793
(since the way the grimoire handles it has changed)
based on a patch by PyroBor

diff --git a/ChangeLog b/ChangeLog
index 29c5e03..3dd8f0f 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
2010-12-30 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* libtrack, common: newer installwatch has a different log variable
#13873
* libsummon: skip some more files in source_sanity
+ * config, libsorcery: be a bit more smart about setting the pager
#15793

2010-10-19 Bor Kraljič <pyrobor AT ver.si>
* libsummon: moved sanity check of source to right after download
(#15886)
diff --git a/etc/sorcery/config b/etc/sorcery/config
index 20d92c2..1a808f0 100755
--- a/etc/sorcery/config
+++ b/etc/sorcery/config
@@ -68,13 +68,6 @@ FORCE_BASESYSTEM_DEPENDS=${FORCE_BASESYSTEM_DEPENDS:-off}

URL_HTTP_FTP_TIMEOUT=${URL_HTTP_FTP_TIMEOUT:=90}

- # pager info
- # -R: display color codes properly
- # -E: quit at eof (otherwise scribe pauses on empty
updates)
- # -X: dont do screen init and deinit, gaze install
- # of a small spell is effectively useless otherwise as
the
- # screen is cleared afterwards.
- PAGER=${PAGER:=less -R -F -X -f}
FILEPROG=${FILEPROG:=file}
DIALOGPROG=${DIALOGPROG:=dialog}

@@ -182,6 +175,7 @@ PROGRESS_SPINNER_CHARS=${PROGRESS_SPINNER_CHARS:-'-\|/'}
STANDARD_IFS=$WHITESPACE_IFS

. $SUBROUTINES
+set_pager

. $MEDIA_CONFIG
. $ROOTS_CONFIG
diff --git a/var/lib/sorcery/modules/libsorcery
b/var/lib/sorcery/modules/libsorcery
index 49ccde0..2bd5aad 100755
--- a/var/lib/sorcery/modules/libsorcery
+++ b/var/lib/sorcery/modules/libsorcery
@@ -1265,6 +1265,37 @@ function override_grimoires() {
}

#---------------------------------------------------------------------
+## Sets the most appropriate params for PAGER
+## @Globals PAGER
+#---------------------------------------------------------------------
+function set_pager() {
+ if [[ -z $PAGER ]]; then
+ # pager info
+ # -R: display color codes properly
+ # -F: quit on one-screenfull of data (otherwise scribe pauses on empty
updates)
+ # -X: dont do screen init and deinit, gaze install
+ # of a small spell is effectively useless otherwise as the
+ # screen is cleared afterwards.
+ # -f: force it, since we may not be dealing with a regular file
+ PAGER="less -R -F -X -f"
+ return
+ fi
+
+ local pager_prog
+ local pager_params=${PAGER#* }
+ smgl_basename "${PAGER%% *}" pager_prog
+
+ # TODO: add any needed options for the rest of the pagers
+ case $pager_prog in
+ less) PAGER="less -R -F -X -f $pager_params" ;;
+ most) PAGER="most $pager_params" ;;
+ w3m) PAGER="w3m $pager_params" ;;
+ more) PAGER="more $pager_params";;
+ *) ;;
+ esac
+}
+
+#---------------------------------------------------------------------
##
## This software is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by




Archive powered by MHonArc 2.6.24.

Top of Page