docs-common/bin fdpsh,1.2,1.3

Tommy Reynolds (jtr) fedora-docs-commits at redhat.com
Fri Jan 27 23:16:04 UTC 2006


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




More information about the Fedora-docs-commits mailing list