summaryrefslogtreecommitdiffstats
path: root/utilities
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2013-11-14 16:41:08 -0800
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2013-11-14 16:48:08 -0800
commit8383aa101de7ac0f2d5a62101713a0fb8b873724 (patch)
tree406bb49c039eb446250a222eff46f400f9d39b3a /utilities
parent87a645d2aa0bdbe64d6e3ef6898d0e53d36a3e7c (diff)
downloadperfbook-8383aa101de7ac0f2d5a62101713a0fb8b873724.tar.gz
Don't blow away inkscape PDFs during "make clean".
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'utilities')
-rw-r--r--utilities/cleanpdf.sh35
1 files changed, 35 insertions, 0 deletions
diff --git a/utilities/cleanpdf.sh b/utilities/cleanpdf.sh
new file mode 100644
index 00000000..6b9c35e5
--- /dev/null
+++ b/utilities/cleanpdf.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+#
+# Clean up .pdf files that are not associated with .svg files.
+#
+# Usage: cleanpdf.sh
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# Copyright (C) IBM Corporation, 2013
+#
+# Authors: Paul E. McKenney <paulmck@us.ibm.com>
+
+names=`find . -name '*.pdf' -print`
+for i in $names
+do
+ basename="${i%.pdf}"
+ if test -f "$basename.svg"
+ then
+ :
+ else
+ rm -f "$i"
+ fi
+done