Date: Thu, 18 Feb 1999 16:32:35 -0800 (PST) From: jobaldwi@vt.edu To: freebsd-gnats-submit@freebsd.org Subject: misc/10155: path to allow PicoBSD build script to use existing custom configs Message-ID: <19990219003235.9E1D811BDE@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 10155 >Category: misc >Synopsis: path to allow PicoBSD build script to use existing custom configs >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Feb 18 16:40:02 PST 1999 >Closed-Date: >Last-Modified: >Originator: John Baldwin >Release: FreeBSD 3.0-STABLE >Organization: >Environment: FreeBSD john.baldwin.cx 3.0-STABLE FreeBSD 3.0-STABLE #7: Wed Feb 17 22:54:30 EST 1999 john@john.baldwin.cx:/usr/source/src/sys/compile/JOHN i386 >Description: The PicoBSD build script requires one to re-enter the full path for a custom config everytime, which can be incovenient when one is frequently rebuilding a custom config. Also, the build script can create some weird links when it tries to softlink /usr/src/release/picobsd/custom to a directory that it is already symlinked to. The patch below addresses both issues. >How-To-Repeat: cd /usr/src/release/picobsd/build ./build <select a custom config> ./build <have to re-enter full path to custom config again> >Fix: Apply this patch to /usr/src/release/picobsd/build/build: --- build.orig Wed Jan 20 13:27:35 1999 +++ build Wed Jan 20 13:40:37 1999 @@ -107,6 +107,23 @@ done } +# check for existing custom config directory and ask user if they want to use i t + +check_for_old_custom() { + KEEP_CUSTOM=no + if [ ! -d ../custom ] + then + return + fi + clear + echo " Custom directory setup" + echo "" + echo "There is an existing custom configuration linked to" + ls -l ../custom | awk -F\> '{ print $2 }' | awk '{ print $1 }' + echo "" + read -p "Do you wish to use the existing custom directory? (yes/no): " K EEP_CUSTOM +} + # Ask for, and set the custom config directory set_custom() { @@ -251,8 +268,13 @@ fi if [ "X${TYPE}" = "Xcustom" ] then - set_custom - (cd ..; ln -sf ${CUST_DIR} custom) + check_for_old_custom + if [ "X${KEEP_CUSTOM}" != "Xyes" ] + then + [ -r ../custom ] && rm -f ../custom + set_custom + (cd ..; ln -sf ${CUST_DIR} custom) + fi fi if [ "X${TYPE}" = "Xdial" -a "X${INIT}" = "X" ] then >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990219003235.9E1D811BDE>