From 764070a86a7aa98480eaaff64dfba7e2f2943292 Mon Sep 17 00:00:00 2001 From: kartofen Date: Thu, 22 Dec 2022 22:43:44 +0200 Subject: refactor --- ppmtopng.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 ppmtopng.sh (limited to 'ppmtopng.sh') 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 -- cgit v1.2.3