From: Ben Gras Date: Thu, 14 Feb 2013 22:56:17 +0000 (+0000) Subject: pkgin_all: script to auto-install all packages X-Git-Tag: v3.2.1~3 X-Git-Url: http://zhaoyanbai.com/repos/host.html?a=commitdiff_plain;h=d6be9725c9d75c49f9b205939401f883f60cc9f6;p=minix.git pkgin_all: script to auto-install all packages Change-Id: I858c6d2b1c117c1fb5f702ab9c4921e86fb0cec5 --- diff --git a/commands/Makefile b/commands/Makefile index aba23a3c1..40be52a6a 100644 --- a/commands/Makefile +++ b/commands/Makefile @@ -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 index 000000000..89d152756 --- /dev/null +++ b/commands/pkgin_all/Makefile @@ -0,0 +1,4 @@ +SCRIPTS= pkgin_all.sh +MAN= + +.include diff --git a/commands/pkgin_all/pkgin_all.sh b/commands/pkgin_all/pkgin_all.sh new file mode 100644 index 000000000..d077ccee9 --- /dev/null +++ b/commands/pkgin_all/pkgin_all.sh @@ -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 diff --git a/distrib/sets/lists/minix/mi b/distrib/sets/lists/minix/mi index 4f2d16321..4461eada6 100644 --- a/distrib/sets/lists/minix/mi +++ b/distrib/sets/lists/minix/mi @@ -316,6 +316,7 @@ ./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 diff --git a/etc/motd b/etc/motd index fac605965..e6433676b 100755 --- 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.