From b9e40031579ffd1d3a3812c9808294820895b3ce Mon Sep 17 00:00:00 2001 From: ache Date: Tue, 13 Jun 2017 19:25:23 +0000 Subject: rename of img2pdf to imgs2pdf --- img2pdf.sh | 30 ------------------------------ imgs2pdf.sh | 30 ++++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 30 deletions(-) delete mode 100755 img2pdf.sh create mode 100755 imgs2pdf.sh diff --git a/img2pdf.sh b/img2pdf.sh deleted file mode 100755 index a3c9a19..0000000 --- a/img2pdf.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - -ext=$1 -out=$2 - -if [ -z "$ext" ] ; then - echo "img2pdf (png,jpg,tiff,...) (output)" - exit -fi -if [ -z "$out" ] ; then - out=$(basename `pwd`).pdf -fi - -for img in $( echo `ls -v | egrep \."$ext"$` ) ; do - echo Traitement de "$img" - img2pdf --output "${img//$ext/pdf}" "$img" -done; - -if [ -e "$out" ] ; then - echo "Gestion backup" - set -x - rm "$out" - set +x -fi - -gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile="$out" `ls -v | egrep \.pdf$` - -for img in *."$ext" ; do - rm "${img:0: $(( -1 + -${#ext} )) }.pdf" -done; diff --git a/imgs2pdf.sh b/imgs2pdf.sh new file mode 100755 index 0000000..a3c9a19 --- /dev/null +++ b/imgs2pdf.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +ext=$1 +out=$2 + +if [ -z "$ext" ] ; then + echo "img2pdf (png,jpg,tiff,...) (output)" + exit +fi +if [ -z "$out" ] ; then + out=$(basename `pwd`).pdf +fi + +for img in $( echo `ls -v | egrep \."$ext"$` ) ; do + echo Traitement de "$img" + img2pdf --output "${img//$ext/pdf}" "$img" +done; + +if [ -e "$out" ] ; then + echo "Gestion backup" + set -x + rm "$out" + set +x +fi + +gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile="$out" `ls -v | egrep \.pdf$` + +for img in *."$ext" ; do + rm "${img:0: $(( -1 + -${#ext} )) }.pdf" +done; -- cgit v1.2.3