diff options
author | rillig <rillig> | 2007-01-26 07:57:04 +0000 |
---|---|---|
committer | rillig <rillig> | 2007-01-26 07:57:04 +0000 |
commit | e40c309739481cd2a3702c296d3b0bcf0c48c920 (patch) | |
tree | 7c514b6e2ccca30aa20986162022efcfe8d66b26 /bootstrap | |
parent | fd6c5f4d5b46e201c33676816b76d32cd97715f3 (diff) | |
download | pkgsrc-e40c309739481cd2a3702c296d3b0bcf0c48c920.tar.gz |
The example mk.conf is installed automatically if there isn't already a
mk.conf. This makes using pkgsrc a bit easier.
Diffstat (limited to 'bootstrap')
-rwxr-xr-x | bootstrap/bootstrap | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/bootstrap/bootstrap b/bootstrap/bootstrap index 8034b9f4f5c..0cfebb5aa6a 100755 --- a/bootstrap/bootstrap +++ b/bootstrap/bootstrap @@ -1,6 +1,6 @@ #! /bin/sh -# $NetBSD: bootstrap,v 1.88 2006/11/06 21:08:42 tv Exp $ +# $NetBSD: bootstrap,v 1.89 2007/01/26 07:57:04 rillig Exp $ # # # Copyright (c) 2001-2002 Alistair G. Crooks. All rights reserved. @@ -909,6 +909,20 @@ register_package "pkgtools/pkg_install" echo_msg "Installing packages(7) man page" run_cmd "(cd $pkgsrcdir/pkgtools/pkgmanpages && $bmake PKG_VERBOSE=yes MAKECONF=${MKCONF_EXAMPLE} WRKOBJDIR=$wrkobjdir CREATE_WRKDIR_SYMLINK=no install)" +etc_mk_conf="$sysconfdir/mk.conf" + +# Install the example mk.conf so that it is used, but only if it doesn't +# exist yet. +# +# Note: I can remember that there had been some reason why this step +# should be left out, but I can't recall it. So if you remove this code, +# please document the reason here. +mkdir_p "$sysconfdir" +if [ ! -f "$etc_mk_conf" ]; then + cp "$MKCONF_EXAMPLE" "$etc_mk_conf" + MKCONF_EXAMPLE="$etc_mk_conf" +fi + hline="===========================================================================" echo "" echo "$hline" @@ -921,8 +935,10 @@ echo "has been created for you. It can be found in:" echo "" echo " ${MKCONF_EXAMPLE}" echo "" -echo "Please copy it to ${sysconfdir}/mk.conf to use it." -echo "" +if [ "$MKCONF_EXAMPLE" != "$etc_mk_conf" ]; then + echo "Please copy it to $etc_mk_conf to use it." + echo "" +fi echo "You can find extensive documentation of the NetBSD Packages Collection" echo "in $pkgsrcdir/doc/pkgsrc.txt and packages(7)." echo "" |