Batch Convert Image to PDF

One of my friend was looking for a way of batch converting images in to pdfs. Well, This is how you can do it. I use mac, so tutorial is for Mac/Linux.

Mac: Install Brew From here

Linux: Install imagemagick and poppler-utils

Use this one line script to convert all the image in current folder