aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordylan.araps@gmail.com <dylan.araps@gmail.com>2020-01-14 18:36:40 +0000
committerdylan.araps@gmail.com <dylan.araps@gmail.com>2020-01-14 18:36:40 +0000
commit8fb8093b752aa2388558256972419a3978f2c291 (patch)
tree47037fa45f6699768d43ada2385ab615dbdb9f8b
parent99983140592addd7f69accc615a8392777158bca (diff)
downloadcpt-8fb8093b752aa2388558256972419a3978f2c291.tar.gz
kiss: fix comments
FossilOrigin-Name: a8e6a8161f72929ee57adcb147c8cff2312fc7ce01e5381fe517559908e15b2a
-rwxr-xr-xkiss12
1 files changed, 8 insertions, 4 deletions
diff --git a/kiss b/kiss
index 7de46b7..39b1b86 100755
--- a/kiss
+++ b/kiss
@@ -23,7 +23,6 @@ log() {
# '\033[m': Reset text formatting.
# '${3:-->}': If the 3rd argument is missing, set prefix to '->'.
# '${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.
printf '\033[1;33m%s \033[m%s\033[m %s\n' \
"${3:-->}" "${2:+}$1${2:+}" "$2"
@@ -201,7 +200,6 @@ pkg_extract() {
pkg_depends() {
# Resolve all dependencies and generate an ordered list.
-
repo_dir=$(pkg_find "$1")
# This does a depth-first search. The deepest dependencies are
@@ -233,6 +231,9 @@ pkg_strip() {
log "$1" "Stripping binaries and libraries"
# 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
case $(readelf -h "$file" 2>/dev/null) in
*" DYN "*) strip_opt=unneeded ;;
@@ -325,6 +326,10 @@ pkg_junk() (
# Default list of directories and their contents to be removed from
# built packages. This default assumes a prefix of '/usr' though the
# 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=$rm:usr/share/gettext:usr/share/locale:usr/share/bash-completion
rm=$rm:etc/bash_completion.d:usr/share/applications
@@ -550,7 +555,6 @@ pkg_build() {
pkg_checksums() {
# Generate checksums for packages.
-
repo_dir=$(pkg_find "$1")
while read -r src _ || [ "$src" ]; do
@@ -579,7 +583,7 @@ pkg_conflicts() {
log "$2" "Checking for package conflicts"
# 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).
tar xf "$1" -O "./$pkg_db/$2/manifest" | while read -r file; do
case $file in */) continue; esac