13 lines
313 B
Bash
Executable File
13 lines
313 B
Bash
Executable File
#! /usr/bin/env bash
|
|
|
|
sourcePath=${1}
|
|
|
|
sourceDirectory=$(dirname ${sourcePath})
|
|
sourceFile=$(basename $sourcePath)
|
|
targetFile=${sourceFile%%.*}.jpg
|
|
targetPath=${sourceDirectory}/${targetFile}
|
|
|
|
echo "Processing ${sourcePath}"
|
|
convert -resize "2048>" ${sourcePath} ${targetPath}
|
|
guetzli ${targetPath} ${targetPath}
|