forked from kiss-community/kiss
kiss: fix comments
This commit is contained in:
parent
ab46222e56
commit
c8de8500f4
12
kiss
12
kiss
@ -23,7 +23,6 @@ log() {
|
|||||||
# '\033[m': Reset text formatting.
|
# '\033[m': Reset text formatting.
|
||||||
# '${3:-->}': If the 3rd argument is missing, set prefix to '->'.
|
# '${3:-->}': If the 3rd argument is missing, set prefix to '->'.
|
||||||
# '${2:+[1;3Xm}': If the 2nd argument exists, set the text style of '$1'.
|
# '${2:+[1;3Xm}': If the 2nd argument exists, set the text style of '$1'.
|
||||||
# '$((${#1}%5+1))': Color the package name based on its length.
|
|
||||||
# '${2:+[m}': If the 2nd argument exists, reset text formatting.
|
# '${2:+[m}': If the 2nd argument exists, reset text formatting.
|
||||||
printf '\033[1;33m%s \033[m%s\033[m %s\n' \
|
printf '\033[1;33m%s \033[m%s\033[m %s\n' \
|
||||||
"${3:-->}" "${2:+[1;36m}$1${2:+[m}" "$2"
|
"${3:-->}" "${2:+[1;36m}$1${2:+[m}" "$2"
|
||||||
@ -201,7 +200,6 @@ pkg_extract() {
|
|||||||
|
|
||||||
pkg_depends() {
|
pkg_depends() {
|
||||||
# Resolve all dependencies and generate an ordered list.
|
# Resolve all dependencies and generate an ordered list.
|
||||||
|
|
||||||
repo_dir=$(pkg_find "$1")
|
repo_dir=$(pkg_find "$1")
|
||||||
|
|
||||||
# This does a depth-first search. The deepest dependencies are
|
# This does a depth-first search. The deepest dependencies are
|
||||||
@ -233,6 +231,9 @@ pkg_strip() {
|
|||||||
log "$1" "Stripping binaries and libraries"
|
log "$1" "Stripping binaries and libraries"
|
||||||
|
|
||||||
# Strip only files matching the below ELF types.
|
# Strip only files matching the below ELF types.
|
||||||
|
# NOTE: 'readelf' is used in place of 'file' as
|
||||||
|
# it allows us to remove 'file' from the
|
||||||
|
# core repositories altogether.
|
||||||
find "$pkg_dir/$1" -type f | while read -r file; do
|
find "$pkg_dir/$1" -type f | while read -r file; do
|
||||||
case $(readelf -h "$file" 2>/dev/null) in
|
case $(readelf -h "$file" 2>/dev/null) in
|
||||||
*" DYN "*) strip_opt=unneeded ;;
|
*" DYN "*) strip_opt=unneeded ;;
|
||||||
@ -325,6 +326,10 @@ pkg_junk() (
|
|||||||
# Default list of directories and their contents to be removed from
|
# Default list of directories and their contents to be removed from
|
||||||
# built packages. This default assumes a prefix of '/usr' though the
|
# built packages. This default assumes a prefix of '/usr' though the
|
||||||
# user can further configure it to search whatever paths they desire.
|
# user can further configure it to search whatever paths they desire.
|
||||||
|
#
|
||||||
|
# TODO: This could be nicer as could the interface to it. Something
|
||||||
|
# which allows for the addition/subtraction from the list
|
||||||
|
# would be desirable.
|
||||||
rm=usr/share/doc:usr/share/gtk-doc:usr/share/info:usr/share/polkit-1
|
rm=usr/share/doc:usr/share/gtk-doc:usr/share/info:usr/share/polkit-1
|
||||||
rm=$rm:usr/share/gettext:usr/share/locale:usr/share/bash-completion
|
rm=$rm:usr/share/gettext:usr/share/locale:usr/share/bash-completion
|
||||||
rm=$rm:etc/bash_completion.d:usr/share/applications
|
rm=$rm:etc/bash_completion.d:usr/share/applications
|
||||||
@ -550,7 +555,6 @@ pkg_build() {
|
|||||||
|
|
||||||
pkg_checksums() {
|
pkg_checksums() {
|
||||||
# Generate checksums for packages.
|
# Generate checksums for packages.
|
||||||
|
|
||||||
repo_dir=$(pkg_find "$1")
|
repo_dir=$(pkg_find "$1")
|
||||||
|
|
||||||
while read -r src _ || [ "$src" ]; do
|
while read -r src _ || [ "$src" ]; do
|
||||||
@ -579,7 +583,7 @@ pkg_conflicts() {
|
|||||||
log "$2" "Checking for package conflicts"
|
log "$2" "Checking for package conflicts"
|
||||||
|
|
||||||
# Filter the tarball's manifest and select only files
|
# Filter the tarball's manifest and select only files
|
||||||
# and any files they resolve to on the filesystem \
|
# and any files they resolve to on the filesystem
|
||||||
# (/bin/ls -> /usr/bin/ls).
|
# (/bin/ls -> /usr/bin/ls).
|
||||||
tar xf "$1" -O "./$pkg_db/$2/manifest" | while read -r file; do
|
tar xf "$1" -O "./$pkg_db/$2/manifest" | while read -r file; do
|
||||||
case $file in */) continue; esac
|
case $file in */) continue; esac
|
||||||
|
Loading…
Reference in New Issue
Block a user