diff options
author | merakor <cem@ckyln.com> | 2021-06-22 09:53:12 +0000 |
---|---|---|
committer | merakor <cem@ckyln.com> | 2021-06-22 09:53:12 +0000 |
commit | c4999043346d76a2dc4241235d855cb4a2469b0c (patch) | |
tree | 6fac0bc393f5a14213925a027aa46e048e022cae | |
parent | e755da5e10aa8af57388cd070d2b16c078b703e2 (diff) | |
download | cpt-c4999043346d76a2dc4241235d855cb4a2469b0c.tar.gz |
pkg_checksums(): Skip all VCS sources
FossilOrigin-Name: fbdbaaea8a4d9427e8b7549ea7afd2a2bb7febb487e652ee20244f4ee76e1225
-rw-r--r-- | src/cpt-lib.in | 13 |
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'" |