summaryrefslogtreecommitdiff
path: root/find-foreign-packages
diff options
context:
space:
mode:
Diffstat (limited to 'find-foreign-packages')
-rwxr-xr-xfind-foreign-packages11
1 files changed, 11 insertions, 0 deletions
diff --git a/find-foreign-packages b/find-foreign-packages
new file mode 100755
index 0000000..845786f
--- /dev/null
+++ b/find-foreign-packages
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+if [ $# -eq 0 ]; then
+ parallel -j0 -n1 "$0" < \
+ "${0%/*}/hosts" | \
+ sort -k1,1
+ exit
+fi
+
+ssh -o ConnectTimeout=5 "$@" 'pacman -Qqm' 2> /dev/null | \
+ sed 's|$| '"$@"'|'