Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to devel-pyrobor2 sorcery by Bor Kraljič (6f47b4d7893056703a03c80a2019885411f03f5d)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Bor Kraljič <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to devel-pyrobor2 sorcery by Bor Kraljič (6f47b4d7893056703a03c80a2019885411f03f5d)
  • Date: Fri, 21 Oct 2011 04:20:35 -0500

GIT changes to devel-pyrobor2 sorcery by Bor Kraljič <pyrobor AT ver.si>:

ChangeLog | 3 +++
etc/sorcery/hooks/xterm_title.hook | 17 -----------------
var/lib/sorcery/modules/libmisc | 17 +++++++++++++++++
3 files changed, 20 insertions(+), 17 deletions(-)

New commits:
commit 6f47b4d7893056703a03c80a2019885411f03f5d
Author: Bor Kraljič <pyrobor AT ver.si>
Commit: Bor Kraljič <pyrobor AT ver.si>

xterm_title.hook,libmisc: moved function set_term_title to libmisc

Some scripts in guru-tools (example hashcheck.sh) use set_term_title.
To be able to use it without init hooks function must be in libmisc.

Such function can be very usefull when coding with sorcery functions so
lets have it in libmisc.

diff --git a/ChangeLog b/ChangeLog
index acade83..2d0802d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2011-10-21 Bor Kraljič <pyrobor AT ver.si>
+ * xterm_title.hook,libmisc: moved function set_term_title to libmisc
+
2011-10-16 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* etc/hooks ...: added hooks support, initial patch by Andraž Levstik

diff --git a/etc/sorcery/hooks/xterm_title.hook
b/etc/sorcery/hooks/xterm_title.hook
index 45ea5bc..1713b6c 100755
--- a/etc/sorcery/hooks/xterm_title.hook
+++ b/etc/sorcery/hooks/xterm_title.hook
@@ -6,23 +6,6 @@

[[ $SET_TERM_TITLE != "on" ]] && return 0

-#---------------------------------------------------------------------
-## @param title
-## @Globals TERM
-##
-## sets the terminal title if TERM=xterm|rxvt or the window title if
-## TERM=screen
-##
-#---------------------------------------------------------------------
-function set_term_title()
-{
- case $TERM in
- xterm*|rxvt) echo -ne "\e]0;$@\007" ;;
- screen) echo -ne "\ek$@\e\\" ;;
- *) true ;;
- esac
-}
-
function xterm_title_cast_initialize_hook() {
set_term_title "cast started"
}
diff --git a/var/lib/sorcery/modules/libmisc b/var/lib/sorcery/modules/libmisc
index 8e4635f..80172a7 100755
--- a/var/lib/sorcery/modules/libmisc
+++ b/var/lib/sorcery/modules/libmisc
@@ -1748,6 +1748,23 @@ function show_file() {
fi
}

+#---------------------------------------------------------------------
+## @param title
+## @Globals TERM
+##
+## sets the terminal title if TERM=xterm|rxvt or the window title if
+## TERM=screen
+##
+#---------------------------------------------------------------------
+function set_term_title()
+{
+ case $TERM in
+ xterm*|rxvt) echo -ne "\e]0;$@\007" ;;
+ screen) echo -ne "\ek$@\e\\" ;;
+ *) true ;;
+ esac
+}
+
# Standard debug line:
# file "function@line" "all" "args"
STD_DEBUG='eval local _stddbg_file=${BASH_SOURCE[0]} ;




Archive powered by MHonArc 2.6.24.

Top of Page