summaryrefslogtreecommitdiffstats
path: root/arch-pkgs-update
diff options
context:
space:
mode:
Diffstat (limited to 'arch-pkgs-update')
-rwxr-xr-xarch-pkgs-update21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch-pkgs-update b/arch-pkgs-update
new file mode 100755
index 0000000..a0d7529
--- /dev/null
+++ b/arch-pkgs-update
@@ -0,0 +1,21 @@
+#!/bin/bash
+#
+[ $# -lt 1 ] && echo "usage $0 pkg_list (generated with pacman -Q)" && exit 1
+
+tmp=/tmp/__pkgs
+[ -e $tmp ] && rm $tmp
+
+echo " * read packages list"
+pkgs=`cat $1 | gawk '{ print $1 }'`
+echo " * search packages to install"
+for pkg in $pkgs; do
+ pacman -Q $pkg >/dev/null 2>&1 || echo $pkg >> $tmp
+done
+if [ -e $tmp ]; then
+ echo " * install packages"
+ pkgs=$(cat $tmp)
+ pacman -S $pkgs || exit 1
+ echo " * done"
+else
+ echo " * nothing todo"
+fi