Permalink
Browse files

add log function

  • Loading branch information...
1 parent 63da7b8 commit f85fe78617c70c62d5d3837513606e69199aea4d @soarpenguin committed Feb 13, 2014
Showing with 6 additions and 2 deletions.
  1. +6 −2 bashrc/standard-funcs-sh
View
@@ -349,8 +349,8 @@ trap cleanup EXIT ## Set trap to call cleanup on exit
# XXX: define $try_lib_paths first.
static_lib_lookup () {
for path in $try_lib_paths; do
- local l=$path/lib$1.a
- test -f $l && echo $l && return 0
+ local l=$path/lib$1.a
+ test -f $l && echo $l && return 0
done
}
@@ -359,3 +359,7 @@ static_lib_lookup () {
uc () { echo "$*" | tr '[:lower:]' '[:upper:]'; }
lc () { echo "$*" | tr '[:upper:]' '[:lower:]'; }
subst () { echo "${1%%$2*}$3${1#*$2}"; }
+
+log() {
+ echo "[`date +"%Y-%m-%d %H:%M:%S"`] ${*}"
+}

0 comments on commit f85fe78

Please sign in to comment.