kiss: comment support in sources

This commit is contained in:
Dylan Araps 2020-02-14 18:06:47 +02:00
parent fc8032211c
commit 8f88aa56fd
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E

11
kiss
View File

@ -173,8 +173,11 @@ pkg_sources() {
repo_dir=$(pkg_find "$1") repo_dir=$(pkg_find "$1")
while read -r src dest || [ "$src" ]; do while read -r src dest || [ "$src" ]; do
# Comment.
if [ -z "${src##\#*}" ]; then :
# Remote source (cached). # Remote source (cached).
if [ -f "${src##*/}" ]; then elif [ -f "${src##*/}" ]; then
log "$1" "Found cached source '${src##*/}'" log "$1" "Found cached source '${src##*/}'"
# Remote git repository. # Remote git repository.
@ -235,10 +238,8 @@ pkg_extract() {
die "Commit hash ${src##*#} doesn't exist" die "Commit hash ${src##*#} doesn't exist"
;; ;;
# Git repository. # Git repository or comment.
git+*) git+*|\#*) continue ;;
continue
;;
# Only 'tar' archives are currently supported for extraction. # Only 'tar' archives are currently supported for extraction.
# Any other file-types are simply copied to '$mak_dir' which # Any other file-types are simply copied to '$mak_dir' which