Restructuring the repo

This commit is contained in:
Alexander Gehrke 2020-04-02 10:38:36 +02:00
parent 21e3cf65e6
commit 3d67598c27
45 changed files with 368 additions and 77 deletions

23
void/xrevdep Executable file
View file

@ -0,0 +1,23 @@
#!/bin/zsh
CLEAR="\e[2K\e[${COLUMNS}D"
printc() {
printf "$CLEAR\e[32m%s\e[0m" "$*" >&2
}
revdep() {
printc "> $1"
parents=$(xbps-query -X "$1")
if [[ -z $parents ]]; then
echo $1
else
while IFS= read -r i; do
revdep $i
done <<<"$parents"
fi
}
result=$(revdep "$1")
printc
sort -u <<<"$result"