aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/cpt-install7
-rw-r--r--src/cpt-lib.in8
2 files changed, 11 insertions, 4 deletions
diff --git a/src/cpt-install b/src/cpt-install
index aab70ea..44842a3 100755
--- a/src/cpt-install
+++ b/src/cpt-install
@@ -18,7 +18,6 @@ if [ -f ./cpt-lib ]; then . ./cpt-lib; else . cpt-lib; fi
}
pkg_order "$@"
-
create_cache
# shellcheck disable=2154
@@ -30,10 +29,10 @@ unset msg
for pkg in $order; do
[ -f "$sys_db/$pkg/message" ] && {
- printf '%s\n%s\n%s\n\n' \
- "=======================================" \
+ printf '\033[1m%s\n%s\n%s\033[m\n\n' \
+ "$(_multiply_char '=' 60)" \
"$pkg" \
- "======================================="
+ "$(_multiply_char '=' 60)"
cat "$sys_db/$pkg/message" >&2
msg=1
}
diff --git a/src/cpt-lib.in b/src/cpt-lib.in
index e7dfe4c..6b95ee7 100644
--- a/src/cpt-lib.in
+++ b/src/cpt-lib.in
@@ -81,6 +81,14 @@ _seq() (
printf '%s' "$buf"
)
+_multiply_char() (
+ buf=
+ for i in $(_seq "$2"); do
+ buf="$buf$1"
+ done
+ out "$buf"
+)
+
_stat() (
_user=; eval set -- "$(ls -ld "$1")"
id -u "${_user:=$3}" >/dev/null 2>&1 || _user=root