rotate script
parent
73003276e4
commit
41a07ef27a
@ -0,0 +1,31 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Script
|
||||
# Software dependencies: imagemagick
|
||||
# Usage: ./rotate.sh imgs-dir-name pdf-filename
|
||||
|
||||
DIR=""
|
||||
DEG=""
|
||||
#echo ${#1}
|
||||
|
||||
if [ ${#1} -gt 0 ] # check arguments given
|
||||
then
|
||||
DIR=$1
|
||||
echo "Images from $DIR directory are being rotated"
|
||||
|
||||
if [ ${#2} -gt 0 ]
|
||||
then
|
||||
DEG=$2
|
||||
for IMG in $DIR* # rotate each $IMG in $DIR n $DEGs
|
||||
do mogrify -rotate $DEG $IMG
|
||||
done
|
||||
else
|
||||
echo "You forgot to provide the roation value (in degrees) as the second argument"
|
||||
fi
|
||||
else
|
||||
echo "You forgot to provide the images directory as the first argument"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue