diff options
author | merakor <cem@ckyln.com> | 2020-04-25 08:09:20 +0000 |
---|---|---|
committer | merakor <cem@ckyln.com> | 2020-04-25 08:09:20 +0000 |
commit | f73a7e90003a8bcb94194f99745387f670a7398f (patch) | |
tree | 4e026fc6932f9e99465c9a3efb6625568e7d11e4 /kiss | |
parent | be41b711489f4bec70834478237ea73656634f9b (diff) | |
download | cpt-f73a7e90003a8bcb94194f99745387f670a7398f.tar.gz |
kiss: Cleanup
FossilOrigin-Name: 11a75411d1d9dfc8c806dfc5c1011d0516938fc3a8e661b697f56a82a01ace21
Diffstat (limited to 'kiss')
-rwxr-xr-x | kiss | 34 |
1 files changed, 16 insertions, 18 deletions
@@ -23,7 +23,6 @@ log() { # '\033[m': Reset text formatting. # '${3:-->}': If the 3rd argument is missing, set prefix to '->'. # '${2:+\033[1;3Xm}': If the 2nd argument exists, set text style of '$1'. - # '${2:+\033[m}': If the 2nd argument exists, reset text formatting. printf '\033[1;33m%s \033[m%b%s\033[m %s\n' \ "${3:-->}" "${2:+\033[1;36m}" "$1" "$2" >&2 } @@ -293,9 +292,9 @@ pkg_extract() { # Git repository, comment or blank line. git+*|\#*|'') continue ;; - # Only 'tar' archives are currently supported for extraction. - # Any other file-types are simply copied to '$mak_dir' which - # allows for manual extraction. + # Only 'tar' an 'zip' archives are currently supported for + # extraction. Other filetypes are simply copied to '$mak_dir' + # which allows for manual extraction. *://*.tar|*://*.tar.??|*://*.tar.???|*://*.tar.????|*://*.tgz) decompress "$src_dir/$1/${src##*/}" | tar xf - --strip-components 1 || @@ -370,7 +369,7 @@ pkg_order() { pkg_strip() { # Strip package binaries and libraries. This saves space on the - # system as well as on the tar-balls we ship for installation. + # system as well as on the tarballs we ship for installation. # Package has stripping disabled, stop here. [ -f "$mak_dir/$pkg/nostrip" ] && return @@ -503,14 +502,14 @@ pkg_etcsums() ( ) pkg_tar() { - # Create a tar-ball from the built package's files. - # This tar-ball also contains the package's database entry. - log "$1" "Creating tar-ball" + # Create a tarball from the built package's files. + # This tarball also contains the package's database entry. + log "$1" "Creating tarball" # Read the version information to name the package. read -r version release < "$(pkg_find "$1")/version" - # Create a tar-ball from the contents of the built package. + # Create a tarball from the contents of the built package. "$tar" cf - -C "$pkg_dir/$1" . | case ${KISS_COMPRESS:=gz} in bz2) bzip2 -z ;; @@ -521,11 +520,11 @@ pkg_tar() { esac \ > "$bin_dir/$1#$version-$release.tar.${KISS_COMPRESS:=gz}" - log "$1" "Successfully created tar-ball" + log "$1" "Successfully created tarball" } pkg_build() { - # Build packages and turn them into packaged tar-balls. This function + # Build packages and turn them into packaged tarballs. This function # also checks checksums, downloads sources and ensure all dependencies # are installed. pkg_build=1 @@ -559,8 +558,7 @@ pkg_build() { # Only ask for confirmation if more than one package needs to be built. [ $# -gt 1 ] || [ "$pkg_update" ] && prompt - log "Checking to see if any dependencies have already been built" - log "Installing any pre-built dependencies" + log "Checking for pre-built dependencies" for pkg do pkg_lint "$pkg"; done @@ -871,7 +869,7 @@ pkg_install_files() { case $line in /etc/*) ;; */) [ -d "$line" ] || install -o root -g root -m "$perms" -d "$line" ;; - *) test "$1" "$line" || + *) test "$1" "$line" || if [ -L "$2/$line" ]; then cp -fPp "$2/$line" "${line%/*}" chown -h root:root "$line" @@ -989,9 +987,9 @@ pkg_remove() { } pkg_install() { - # Install a built package tar-ball. + # Install a built package tarball. - # Install can also take the full path to a tar-ball. + # Install can also take the full path to a tarball. # We don't need to check the repository if this is the case. if [ -f "$1" ] && [ -z "${1%%*.tar.*}" ] ; then tar_file=$1 @@ -1008,7 +1006,7 @@ pkg_install() { mkdir -p "$tar_dir/$pkg_name" log "$pkg_name" "Extracting $tar_file" - # Extract the tar-ball to catch any errors before installation begins. + # Extract the tarball to catch any errors before installation begins. decompress "$tar_file" | "$tar" pxf - -C "$tar_dir/$pkg_name" [ -f "$tar_dir/$pkg_name/$pkg_db/$pkg_name/manifest" ] || @@ -1142,7 +1140,7 @@ pkg_fetch() { # repository. case $(git config merge.verifySignatures) in true) log "$PWD" "[signed ✓] " ;; - *) log "$PWD" " " ;; + *) log "$PWD" " " ;; esac if [ -w "$PWD" ] && [ "$uid" != 0 ]; then |