aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cpt-lib.in13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/cpt-lib.in b/src/cpt-lib.in
index 3858d82..0095bc4 100644
--- a/src/cpt-lib.in
+++ b/src/cpt-lib.in
@@ -1240,21 +1240,20 @@ pkg_checksums() {
[ -f "$repo_dir/sources" ] || return 0
while read -r src _ || [ "$src" ]; do
- # Comment.
- if [ -z "${src##\#*}" ]; then
- continue
+
+ # Skip checksums if it's a comment, or a VCS repository.
+ case $src in
+ \#*|git+*|hg+*|fossil+*) continue ;;
+ esac
# File is local to the package.
- elif [ -f "$repo_dir/$src" ]; then
+ if [ -f "$repo_dir/$src" ]; then
src_path=$repo_dir/${src%/*}
# File is remote and was downloaded.
elif [ -f "$src_dir/$1/${src##*/}" ]; then
src_path=$src_dir/$1
- # File is a git repository.
- elif [ -z "${src##git+*}" ]; then continue
-
# Die here if source for some reason, doesn't exist.
else
die "$1" "Couldn't find source '$src'"