summaryrefslogtreecommitdiff
path: root/scripts/functions
diff options
context:
space:
mode:
authorAnthony Foiani <anthony.foiani@gmail.com>2010-10-22 20:02:57 (GMT)
committerAnthony Foiani <anthony.foiani@gmail.com>2010-10-22 20:02:57 (GMT)
commit92898249bd1eb4c6bc0ab28bd78793464eaa1f9b (patch)
tree0eb9976730d0f028bc325d62c61d30566f084823 /scripts/functions
parent2b912ba84058489780c6fb673c894860bc9147af (diff)
scripts: add "FILE" and "CFG" debug levels.
I ran into some minor difficulties looking through the build log for a particular file: I wasn't interested in seeing it unpacked, but only when it is built or installed. Adding these two levels allows me to differentiate between those cases. [Yann E. MORIN: Those are blind log levels, and are used only to search in the build-log afterward.] Signed-off-by: Anthony Foiani <anthony.foiani@gmail.com>
Diffstat (limited to 'scripts/functions')
-rw-r--r--scripts/functions16
1 files changed, 10 insertions, 6 deletions
diff --git a/scripts/functions b/scripts/functions
index a5e124c..c000fc7 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -49,8 +49,10 @@ CT_LOG_LEVEL_ERROR=0
CT_LOG_LEVEL_WARN=1
CT_LOG_LEVEL_INFO=2
CT_LOG_LEVEL_EXTRA=3
-CT_LOG_LEVEL_ALL=4
-CT_LOG_LEVEL_DEBUG=5
+CT_LOG_LEVEL_CFG=4
+CT_LOG_LEVEL_FILE=5
+CT_LOG_LEVEL_ALL=6
+CT_LOG_LEVEL_DEBUG=7
# Make it easy to use \n and !
CR=$(printf "\n")
@@ -63,6 +65,8 @@ BANG='!'
# - INFO: Informational messages
# - EXTRA: Extra informational messages
# - DEBUG: Debug messages
+# - CFG: Output of various "./configure"-type scripts
+# - FILE: File / archive unpacking.
# - ALL: Component's build messages
# Usage: CT_DoLog <level> [message]
# If message is empty, then stdin will be logged.
@@ -671,9 +675,9 @@ CT_Extract() {
CT_DoLog EXTRA "Extracting '${basename}'"
case "${ext}" in
- .tar.bz2) CT_DoExecLog ALL tar xvjf "${full_file}";;
- .tar.gz|.tgz) CT_DoExecLog ALL tar xvzf "${full_file}";;
- .tar) CT_DoExecLog ALL tar xvf "${full_file}";;
+ .tar.bz2) CT_DoExecLog FILE tar xvjf "${full_file}";;
+ .tar.gz|.tgz) CT_DoExecLog FILE tar xvzf "${full_file}";;
+ .tar) CT_DoExecLog FILE tar xvf "${full_file}";;
/.git) CT_ExtractGit "${basename}" "${@}";;
*) CT_Abort "Don't know how to handle '${basename}${ext}': unknown extension";;
esac
@@ -729,7 +733,7 @@ CT_ExtractGit() {
case "${ref_type}" in
none) ;;
- *) CT_DoExecLog ALL git checkout "${ref}";;
+ *) CT_DoExecLog FILE git checkout "${ref}";;
esac
CT_Popd