From 9ed139b5bae27543dfb42ab5dc70c02874985ca6 Mon Sep 17 00:00:00 2001 From: clsty Date: Tue, 23 Jan 2024 12:35:04 +0800 Subject: [PATCH] Add checkdeps.sh --- checkdeps.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 checkdeps.sh diff --git a/checkdeps.sh b/checkdeps.sh new file mode 100755 index 000000000..21dec885f --- /dev/null +++ b/checkdeps.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +# Check whether deps exists in AUR or repos of Arch. +# Do NOT abuse this since it consumes extra bandwidth from AUR server. + +cd "$(dirname "$0")" +export base="$(pwd)" +source ./scriptdata/functions +source ./scriptdata/installers + +pkglistfile=$(mktemp) +pkglistfile_orig=./scriptdata/dependencies.txt +cat $pkglistfile_orig | sed "s_\ _\n_g" > $pkglistfile + +echo "The non-existent pkgs in $pkglistfile_orig are listed as follows." +# Borrowed from https://bbs.archlinux.org/viewtopic.php?pid=1490795#p1490795 +comm -23 <(sort -u $pkglistfile) <(sort -u <(wget -q -O - https://aur.archlinux.org/packages.gz | gunzip) <(pacman -Ssq)) +echo "End. If nothing appears, then all pkgs exist."