Author: jtr
Update of /cvs/docs/docs-common/bin
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv7398/bin
Modified Files:
fdpsh
Log Message:
Append commands to the log file "/tmp/fdpsh.log" if, and only if, it
already exists.
Index: fdpsh
===================================================================
RCS file: /cvs/docs/docs-common/bin/fdpsh,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- fdpsh 16 Jan 2006 05:49:23 -0000 1.2
+++ fdpsh 27 Jan 2006 23:15:56 -0000 1.3
@@ -18,6 +18,8 @@
FDPDIR=${FDPBINDIR}/../.. export FDPDIR
SHELL=${FDPBINDIR}/${ME} export SHELL
#
+FDPLOG=/tmp/fdpsh.log
+#
. ${FDPBINDIR}/fdp-functions
#
CMD=
@@ -29,9 +31,11 @@
esac
done
if [ "${CMD}" ]; then
+ [ ! -f ${FDPLOG} ] || echo "${CMD}" >>${FDPLOG}
eval ${CMD}
results=$?
elif [ $# -gt 0 ]; then
+ [ ! -f ${FDPLOG} ] || echo "${CMD}" >>${FDPLOG}
eval $@
results=$?
else
@@ -40,6 +44,7 @@
echo -n "${ME}> " >&2
read -e cmd
if [ "${cmd}" ]; then
+ [ ! -f ${FDPLOG} ] || echo "${CMD}" >>${FDPLOG}
eval ${cmd}
results=$?
if [ ${results} -gt 0 ]; then
Show replies by date