iankelling.org
/
git
/
log-quiet
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update README for gitorious move
[log-quiet]
/
logq-function
diff --git
a/logq-function
b/logq-function
index c2b99f21445e5e45d1079c29cf0df0dff61b1f55..afe722fbbeab25b79787fa918f08c2732768ddd5 100644
(file)
--- a/
logq-function
+++ b/
logq-function
@@
-18,7
+18,7
@@
alphanumeric characters of COMMAND + ARGs."
$help"
return 1
fi
$help"
return 1
fi
-
+
local index=0
local x prettycommand
for x in "$@"; do
local index=0
local x prettycommand
for x in "$@"; do
@@
-26,14
+26,12
@@
$help"
index=$(( index+1 ))
done
index=$(( index+1 ))
done
-
+
local file="$*"
file="$(mktemp -d)/${file//[^[:alnum:]]/}"
local file="$*"
file="$(mktemp -d)/${file//[^[:alnum:]]/}"
- echo "log of $prettycommand" >"$file"
- date >>"$file"
- echo >>"$file"
-
+ printf "%s\n%s\n\n" "log of $prettycommand" "$(date)" >"$file"
+
# we will propagate any errors
local e=$-
[[ $e == *e* ]] && set +e
# we will propagate any errors
local e=$-
[[ $e == *e* ]] && set +e
@@
-41,13
+39,10
@@
$help"
local ret=$?
[[ $e == *e* ]] && set -e
local ret=$?
[[ $e == *e* ]] && set -e
- echo >>"$file"
- echo "----------------" >>"$file"
- date >>"$file"
- echo "end of log" >>"$file"
-
+ printf "\n%s\n%s\n%s" "----------------" "$(date)" "end of log" >>"$file"
+
echo -n "\$?=$ret "
echo -n "$prettycommand"
echo "[log] $file"
return $ret
echo -n "\$?=$ret "
echo -n "$prettycommand"
echo "[log] $file"
return $ret
-}
+}