docs: update

This commit is contained in:
Dylan Araps 2020-05-23 09:30:45 +03:00
parent 14695e2bf8
commit 74ed4988c9
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E

10
kiss
View File

@ -317,16 +317,20 @@ pkg_extract() {
;; ;;
# Git repository, comment or blank line. # Git repository, comment or blank line.
git+*|\#*|'') continue ;; git+*|\#*|'') ;;
# Tarballs of any kind. This is a shell equivalent of # Tarballs of any kind. This is a shell equivalent of
# GNU tar's '--strip-components 1'. # GNU tar's '--strip-components 1'.
*://*.tar|*://*.tar.??|*://*.tar.???|*://*.tar.????|*://*.t?z) *://*.tar|*://*.tar.??|*://*.tar.???|*://*.tar.????|*://*.t?z)
# Decompress the archive to a temporary .tar archive.
decompress "$src_dir/$1/${src##*/}" > .ktar decompress "$src_dir/$1/${src##*/}" > .ktar
tar xf .ktar || # Extract the tar archive to the current directory.
die "$1" "Couldn't extract ${src##*/}" tar xf .ktar || die "$1" "Couldn't extract ${src##*/}"
# Iterate over all directories in the first level of the
# tarball's manifest. This is our equivalent of GNU tar's
# '--strip-components 1'.
tar tf .ktar | while IFS=/ read -r dir _; do tar tf .ktar | while IFS=/ read -r dir _; do
# Some tarballs contain './' as the top-level directory, # Some tarballs contain './' as the top-level directory,
# we need to skip these occurances. # we need to skip these occurances.