diff options
author | Saumit Dinesan <justsaumit@protonmail.com> | 2022-08-04 08:02:50 +0530 |
---|---|---|
committer | Saumit Dinesan <justsaumit@protonmail.com> | 2022-08-04 08:02:50 +0530 |
commit | ce09a55db0752021da343788e4a0dbfbaa1d958f (patch) | |
tree | 75ffe31f83594a4eb1b131b52fcfb69bd156241e /.scripts/pic-conv | |
parent | 90e0a07bfb63fcfdeb6791d0f5d4586af55b4ee1 (diff) |
addition of picconv and pdfpicconv script
Diffstat (limited to '.scripts/pic-conv')
-rwxr-xr-x | .scripts/pic-conv | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/.scripts/pic-conv b/.scripts/pic-conv new file mode 100755 index 0000000..117292e --- /dev/null +++ b/.scripts/pic-conv @@ -0,0 +1,11 @@ +#!/bin/sh +## Simple shellscript to convert png images to jpg and vice versa in a given folder + +if [[ "$1" = "-j" ]]; then + find . -name "*.png" -exec mogrify -format jpg {} \; +elif [[ "$1" = "-p" ]]; then + find . -name "*.jpg" -exec mogrify -format png {} \; +else + echo "Use correct flags!" && exit +fi + |