aboutsummaryrefslogtreecommitdiff
path: root/ppmtopng.sh
diff options
context:
space:
mode:
authorkartofen <mladenovnasko0@gmail.com>2022-12-22 22:43:44 +0200
committerkartofen <mladenovnasko0@gmail.com>2022-12-22 22:43:44 +0200
commit764070a86a7aa98480eaaff64dfba7e2f2943292 (patch)
tree830589ac702d540bfd76cfb0e5faa5e8988432b0 /ppmtopng.sh
parent4c9fafc4c126af2466dc6c56b9c952f901a1c726 (diff)
refactor
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