]> Zhao Yanbai Git Server - minix.git/commitdiff
pkgin_all: script to auto-install all packages 31/331/1
authorBen Gras <ben@minix3.org>
Thu, 14 Feb 2013 22:56:17 +0000 (22:56 +0000)
committerBen Gras <ben@minix3.org>
Thu, 14 Feb 2013 22:58:29 +0000 (22:58 +0000)
Change-Id: I858c6d2b1c117c1fb5f702ab9c4921e86fb0cec5

commands/Makefile
commands/pkgin_all/Makefile [new file with mode: 0644]
commands/pkgin_all/pkgin_all.sh [new file with mode: 0644]
distrib/sets/lists/minix/mi
etc/motd

index aba23a3c1572c3e8b753fab6af2b7f10019ebe16..40be52a6a6f1e05ff51921adf06b6d34eb80b67b 100644 (file)
@@ -30,7 +30,7 @@ SUBDIR=       add_route arp ash at backup banner basename btrace cal \
        truncate tty udpstat umount uname unexpand \
        unstack update uud uue version vol wc \
        whereis which who write writeisofs fetch \
-       xargs yes zdump zmodem pkgin_cd \
+       xargs yes zdump zmodem pkgin_cd pkgin_all \
        worldstone updateboot update_bootcfg
 
 .if ${MACHINE_ARCH} == "i386"
diff --git a/commands/pkgin_all/Makefile b/commands/pkgin_all/Makefile
new file mode 100644 (file)
index 0000000..89d1527
--- /dev/null
@@ -0,0 +1,4 @@
+SCRIPTS= pkgin_all.sh
+MAN=
+
+.include <bsd.prog.mk>
diff --git a/commands/pkgin_all/pkgin_all.sh b/commands/pkgin_all/pkgin_all.sh
new file mode 100644 (file)
index 0000000..d077cce
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+set -e
+echo "Updating package database.."
+pkgin update
+echo "Making available package list.."
+packages="`pkgin av | awk '{ print $1 }'`"
+echo "Made list of `echo $packages | wc -w` packages."
+echo $packages | xargs -n50 pkgin -y in
index 4f2d16321f1fbd4a0b8290c7ec98ce4d816be73e..4461eada6a7d01c97336a6d599cbe7adba4bfd2f 100644 (file)
 ./usr/bin/pax                          minix-sys       obsolete
 ./usr/bin/ping                         minix-sys
 ./usr/bin/pkgin_cd                     minix-sys
+./usr/bin/pkgin_all                    minix-sys
 ./usr/bin/postinstall                  minix-sys
 ./usr/bin/poweroff                     minix-sys
 ./usr/bin/prep                         minix-sys
index fac6059652b16592bf22aa70fc3c94c9debd9c1d..e6433676bf02c235964a6846ff20e15bf0b3975f 100755 (executable)
--- a/etc/motd
+++ b/etc/motd
@@ -8,7 +8,8 @@ list of commands.  For example, 'pkgin install vim' installs the 'vim'
 package, and 'pkgin available' will list all available packages.
 
 To install packages from the installation CD: same, but use pkgin_cd.
-To switch to the online repository, do 'pkgin update' again.
+To switch to the online repository, do 'pkgin update' again. To install
+all packages, do pkgin_all.
 
 MINIX 3 supports multiple virtual terminals. Just use ALT+F1, F2, F3
 and F4 to navigate among them.