Skip to content

Commit

Permalink
beesh: Show downloaded file name after rename
Browse files Browse the repository at this point in the history
Its nicer to have the filename of the downloaded file in the output, for
example to copy-and-paste it into tools/srcurl.

Move the existing `ls -l` to a point when it already has been renamed
from .tmp to its final name.
  • Loading branch information
donald committed Nov 4, 2024
1 parent cabdf83 commit a60176a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/beesh.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -283,13 +283,13 @@ function fetch_one_file() {
--timeout=60 \
--tries=1 \
"${url}"
ls -ld "${F}/${file}.tmp"
if [ ! -s "${F}/${file}.tmp" ] ; then
print_error "ERROR: ${F}/${file}.tmp is empty, download failed."
rm "${F}/${file}.tmp"
exit 1
fi
mv "${F}/${file}.tmp" "${F}/${file}"
ls -ld "${F}/${file}"
fi
fi

Expand Down

0 comments on commit a60176a

Please sign in to comment.