[Tex/LaTex] Why won’t the glossaries print

acronymscompilingglossaries

I have a look around online and at other posts however I haven't been able to find a solution to this problem. Here is the code I'm using:

\documentclass[a4paper,final]{report}
\usepackage{epsfig}
\usepackage{url}
\usepackage[acronym,toc,nonumberlist]{glossaries}
\usepackage{algorithm, algorithmic}
\usepackage{amssymb,amsmath}
\usepackage[margin=3cm]{geometry}
\parindent 0pt


% Create the glossaries
\makeglossaries

% Create the list of Acronyms
\newacronym{LDN}{LDN}{London}
\newacronym{NYC}{NYC}{New York City}

\glsaddall


\begin{document}

\tableofcontents
\printglossaries

\end{document}

I then compile the document through TeXShop (on Mac) using the following Engine:

#!/bin/sh
bfname=$(dirname "$1")/"`basename "$1" .tex`"
pdflatex --shell-escape "$1"
makeindex -s "$bfname".ist -t "$bfname".glg -o "$bfname".gls "$bfname".glo
"$bfname".glo
pdflatex --shell-escape "$1"
pdflatex --shell-escape "$1"

However, it compiles the document and everything in it looks fine. The only exception being that the glossaries aren't displayed. Please can someone help me out?

Best Answer

To resolve the issue I added the following line to the engine script:

makeglossaries "$bfname".acn