pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/mklivecd/files Extra bonus for 0.15: if there...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ecd8724fbb83
branches:  trunk
changeset: 527522:ecd8724fbb83
user:      xtraeme <xtraeme%pkgsrc.org@localhost>
date:      Tue Apr 10 03:05:49 2007 +0000

description:
Extra bonus for 0.15: if there's a set already found in BASE_SETS_DIR
downloaded by the fetch target, ask interactively to the user if wants
to download again or not.

diffstat:

 sysutils/mklivecd/files/mklivecd.sh |  13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diffs (36 lines):

diff -r 6178522251ca -r ecd8724fbb83 sysutils/mklivecd/files/mklivecd.sh
--- a/sysutils/mklivecd/files/mklivecd.sh       Tue Apr 10 02:26:00 2007 +0000
+++ b/sysutils/mklivecd/files/mklivecd.sh       Tue Apr 10 03:05:49 2007 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: mklivecd.sh,v 1.33 2007/04/10 02:23:34 xtraeme Exp $
+# $NetBSD: mklivecd.sh,v 1.34 2007/04/10 03:05:49 xtraeme Exp $
 #
 # Copyright (c) 2004-2007 Juan Romero Pardines.
 # All rights reserved.
@@ -546,7 +546,14 @@
             for f in ${BASE_SETS}
             do
                 if [ -f "$f" ]; then
-                    /usr/bin/ftp -4aR "$REMOTE_SETS_URL/$f"
+                    echo -n "There's already '$f', do you want to "
+                    echo -n "download it again? (y/n) "
+                    read output_u
+                    if [ "$output_u" = "y" ]; then
+                        rm "$f"
+                    elif [ "$output_u" = "n" -o "$output_u" != "y" ]; then
+                           continue
+                    fi
                 fi
 
                 if [ -n "$verbose_mode" ]; then
@@ -635,7 +642,7 @@
        cat > $ISODIR/etc/rc.d/root <<_EOF_
 #!/bin/sh
 #
-# \$NetBSD: mklivecd.sh,v 1.33 2007/04/10 02:23:34 xtraeme Exp $
+# \$NetBSD: mklivecd.sh,v 1.34 2007/04/10 03:05:49 xtraeme Exp $
 # 
 
 # PROVIDE: root



Home | Main Index | Thread Index | Old Index