aboutsummaryrefslogtreecommitdiff
path: root/ppmtopng.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ppmtopng.sh')
-rwxr-xr-xppmtopng.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/ppmtopng.sh b/ppmtopng.sh
new file mode 100755
index 0000000..f73dcd1
--- /dev/null
+++ b/ppmtopng.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+cd ${0%/*} # go to project root
+
+if [ $# -eq 0 ]; then
+ echo "Please provide the path"
+ exit 1
+fi
+
+set -xe
+
+for i in $1/file*.ppm; do
+ pnmtopng "$i" >> "${i/ppm/png}"
+done