Permalink
Browse files

Bugfix: checksum file existance checks.

  • Loading branch information...
1 parent cdb5209 commit 7290d80421abd2e2a091c9ce492ece3027cb3716 @wayneeseguin wayneeseguin committed Jun 22, 2013
Showing with 3 additions and 3 deletions.
  1. +3 −3 core/internal/shell/package/strategies/gnu/functions
@@ -210,9 +210,9 @@ __sm.package.fetch.checksum()
${curl} -L "${download_url}" -o "${archives_path}/${package_file}.checksum" 2>/dev/null || return 1
fi
- package_checksum=$(cat "${archives_path}/${package_file}.checksum")
-
- if [[ -f "${archives_path}/${package_file}.checksum" ]]
+ if [[ -s "${archives_path}/${package_file}.checksum" ]]
+ then package_checksum=$(cat "${archives_path}/${package_file}.checksum")
+ elif [[ -f "${archives_path}/${package_file}.checksum" ]]
then rm "${archives_path}/${package_file}.checksum"
fi

0 comments on commit 7290d80

Please sign in to comment.