The move_template_files.sh script expects rsync to be installed. When that is not the case, the call fails, but the script as is does not exit. So nothing is copied, and everything is still deleted. I'd suggest changing move_template_files.sh to (POSIX compatible):
#!/bin/sh
if ! command -v rsync >/dev/null 2>&1; then
echo "rsync required, but not installed!"
exit 1
else
rsync -avh nomad-parser-<code>/ .
rm -rfv nomad-parser-<code>
fi
The
move_template_files.sh
script expectsrsync
to be installed. When that is not the case, the call fails, but the script as is does not exit. So nothing is copied, and everything is still deleted. I'd suggest changingmove_template_files.sh
to (POSIX compatible):