forked from kiss-community/kiss
kiss: display signed repositories
This commit is contained in:
parent
372eb2f5a9
commit
838a289cce
17
kiss
17
kiss
@ -26,7 +26,7 @@ log() {
|
|||||||
# '$((${#1}%5+1))': Color the package name based on its length.
|
# '$((${#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;3$((${#1}%5+1))m}$1${2:+[m}" "$2"
|
"${3:-->}" "${2:+[1;36m}$1${2:+[m}" "$2"
|
||||||
}
|
}
|
||||||
|
|
||||||
die() {
|
die() {
|
||||||
@ -751,19 +751,28 @@ pkg_updates() {
|
|||||||
cd "$(git rev-parse --show-toplevel 2>/dev/null)" 2>/dev/null ||:
|
cd "$(git rev-parse --show-toplevel 2>/dev/null)" 2>/dev/null ||:
|
||||||
|
|
||||||
[ -d .git ] || {
|
[ -d .git ] || {
|
||||||
log "$repo" "Not a git repository, skipping"
|
log "$repo" " "
|
||||||
|
printf '%s\n' "Not a git repository, skipping."
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
[ "$(git remote 2>/dev/null)" ] || {
|
[ "$(git remote 2>/dev/null)" ] || {
|
||||||
log "$repo" "No remote, skipping"
|
log "$repo" " "
|
||||||
|
printf '%s\n' "No remote, skipping."
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
contains "$repos" "$PWD" || {
|
contains "$repos" "$PWD" || {
|
||||||
repos="$repos $PWD "
|
repos="$repos $PWD "
|
||||||
|
|
||||||
log "$PWD" "Updating repository"
|
# Display a tick if signing is enabled for this
|
||||||
|
# repository.
|
||||||
|
case $(git config merge.verifySignatures) in
|
||||||
|
true) signed='[[32;1msigned ✓[m]' ;;
|
||||||
|
*) signed= ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
log "$PWD" "$signed "
|
||||||
|
|
||||||
if [ -w "$PWD" ]; then
|
if [ -w "$PWD" ]; then
|
||||||
git fetch
|
git fetch
|
||||||
|
Loading…
Reference in New Issue
Block a user