forked from kiss-community/kiss
Compare commits
4 Commits
speedup_fi
...
master
Author | SHA1 | Date | |
---|---|---|---|
|
b9a8f9fc28 | ||
|
7740c929a3 | ||
|
9f88746487 | ||
|
584b905d17 |
9
.woodpecker.yml
Normal file
9
.woodpecker.yml
Normal file
@ -0,0 +1,9 @@
|
||||
steps:
|
||||
build:
|
||||
image: alpine
|
||||
when:
|
||||
branch: [ master ]
|
||||
commands: |
|
||||
apk add --no-cache shellcheck
|
||||
|
||||
shellcheck kiss contrib/*
|
16
contrib/kiss-repodepends
Executable file
16
contrib/kiss-repodepends
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/sh -ef
|
||||
# Display a package's dependencies in repositories
|
||||
|
||||
pkg=${1:-"${PWD##*/}"}
|
||||
|
||||
kiss search "$pkg" >/dev/null || {
|
||||
printf 'usage: kiss-depends [pkg]\n' >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
kiss search "$pkg" | while read -r pkgpath; do
|
||||
printf '=> %s\n' "$pkgpath"
|
||||
while read -r dep mak || [ "$dep" ]; do
|
||||
printf '%s%s\n' "$dep" "${mak:+ "$mak"}"
|
||||
done 2>/dev/null < "$pkgpath/depends"
|
||||
done
|
19
contrib/kiss-reporevdepends
Executable file
19
contrib/kiss-reporevdepends
Executable file
@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
# Display packages in all repositories which depend on a package
|
||||
|
||||
[ "$1" ] || set -- "${PWD##*/}"
|
||||
|
||||
suffix () {
|
||||
case "$1" in *"$2") return 0; esac; return 1
|
||||
}
|
||||
|
||||
IFS=:
|
||||
for repo in $KISS_PATH; do
|
||||
# remove trailing slashes
|
||||
while suffix "$repo" /; do repo="${repo%/}"; done
|
||||
gitdir="$(git -C "$repo" rev-parse --show-toplevel 2>/dev/null || echo "$repo")"
|
||||
case "$gitdir" in "$repo") unset prefix ;; *) prefix="${repo##*/}/" ;; esac
|
||||
|
||||
cd "$gitdir/.." || continue
|
||||
grep -E "^$1([[:space:]]|$)" -- "${gitdir##*/}/$prefix"*/depends 2>/dev/null ||:
|
||||
done
|
11
kiss
11
kiss
@ -330,10 +330,7 @@ _pkg_find() {
|
||||
for _find_path in $4 "${3:-$sys_db}"; do set +f
|
||||
ok "$_find_path" || continue
|
||||
for _find_pkg in "$_find_path/"$1; do
|
||||
test "${3:--d}" "$_find_pkg" && {
|
||||
set -f -- "$@" "$_find_pkg"
|
||||
case $2- in -) break 2 ;; esac
|
||||
}
|
||||
test "${3:--d}" "$_find_pkg" && set -f -- "$@" "$_find_pkg"
|
||||
done
|
||||
done
|
||||
|
||||
@ -2010,6 +2007,7 @@ args() {
|
||||
KISS_PID="$KISS_PID" \
|
||||
KISS_ROOT="$KISS_ROOT" \
|
||||
KISS_TMPDIR="$KISS_TMPDIR" \
|
||||
_KISS_DATE="$time" \
|
||||
_KISS_LVL="$_KISS_LVL" \
|
||||
"$0" "$action" "$@"
|
||||
|
||||
@ -2163,7 +2161,10 @@ main() {
|
||||
|
||||
# Store the date and time of script invocation to be used as the name of
|
||||
# the log files the package manager creates during builds.
|
||||
time=$(date +%Y-%m-%d-%H:%M)
|
||||
# Accept _KISS_DATE in case this process has been called by a kiss process
|
||||
# started on a different day, which could cause permission issues if we
|
||||
# create log_dir as root.
|
||||
time=${_KISS_DATE:-"$(date +%Y-%m-%d-%H:%M)"}
|
||||
|
||||
create_tmp_dirs
|
||||
trap_on
|
||||
|
Loading…
Reference in New Issue
Block a user