As the title suggests, I am putting an image into my pdf document using the \includegraphics command. It works, and puts my output main.pdf in the same directory as expected.
Here's where my question starts, I have this "compile" script written by this guy here bilalakil.me which generates a log and uses mv to move the main.pdf to an "output" folder. I can live without the script, but it would be cool if someone had a quick solution to this.
Compile script:
mkdir output
rm -rf .tmp-compiling
mkdir .tmp-compiling
cd .tmp-compiling
cp ../main.bib .
pdflatex ../main.tex
bibtex main
pdflatex ../main.tex
pdflatex ../main.tex
cp main.pdf ../output
cd ..
rm -rf .tmp-compiling
Doing it this way, suddenly the images no longer work.
Expected output:
Using compile script output (not working as expected):

I've already looked through this discussion and tried everything : Stack Exchange Image not Found \includegraphics
Proof that my .tex file and .png image are in the same directory:
LaTeX Warning: File `orbitd1.png' not found on input line 16.
! Package pdftex.def Error: File `orbitd1.png' not found: using draft setting.
Here is the tex document named "main.tex" :
\documentclass{article}
\title{Homework 5}
\author{Kleiner Warden}
\date{date}
\usepackage{graphicx}
\begin{document}
\maketitle
\includegraphics{orbitd1.png}
\end{document}
Long story short, I found a script that was helpful but it breaks the usage of \includegraphics{image}.

pdflatex filerather than use a path such aspdflatex ../fileon the commandline. – David Carlisle Feb 16 '21 at 01:17cd .tmp-compiling cp ../main.bib . cd .. pdflatex main.tex cd .tmp-compiling bibtex main cd .. pdflatex main.tex pdflatex main.tex
cp main.pdf output
rm -rf .tmp-compiling` It now works. Thanks for the tip.
– KleinerWarden Feb 16 '21 at 02:18