summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Southworth <john.southworth@vyatta.com>2011-04-28 16:39:14 -0500
committerJohn Southworth <john.southworth@vyatta.com>2011-04-28 16:39:14 -0500
commitba593c1496ee27cca0e5ff90a7fd7a52d0d155c7 (patch)
tree2a030d2a1c150e3a82ccdc8476dfab52d3c6a681
parentd93d2275eba8e7ce1d1bae31e069e696120b0008 (diff)
parentb2f8b4ac542578b86ed48a6bd8c08911bcb478a9 (diff)
downloadvyatta-op-ba593c1496ee27cca0e5ff90a7fd7a52d0d155c7.tar.gz
vyatta-op-ba593c1496ee27cca0e5ff90a7fd7a52d0d155c7.zip
Merge branch 'napa' of git.vyatta.com:/git/vyatta-op into napa
-rw-r--r--debian/changelog7
-rwxr-xr-xscripts/vyatta-image-tools.pl16
2 files changed, 20 insertions, 3 deletions
diff --git a/debian/changelog b/debian/changelog
index fefc01c..2fef2e0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+vyatta-op (0.13.112) unstable; urgency=low
+
+ * verify the users intention when deleting directories since we don't
+ have a glob
+
+ -- John Southworth <john.southworth@vyatta.com> Thu, 28 Apr 2011 10:42:16 -0500
+
vyatta-op (0.13.111) unstable; urgency=low
* Add options when copying a directory to another directory
diff --git a/scripts/vyatta-image-tools.pl b/scripts/vyatta-image-tools.pl
index b343214..946d817 100755
--- a/scripts/vyatta-image-tools.pl
+++ b/scripts/vyatta-image-tools.pl
@@ -80,9 +80,19 @@ sub delete_file {
}
if (-d $file){
my $print_dir = conv_file_to_rel($topdir,$file);
- if (y_or_n("Do you want to erase the entire $print_dir directory?")){
- system("rm -rf $file");
- print("Directory erased\n");
+ print "This is a directory. Would you like to delete:\n"
+ ." Entire directory (D)\n"
+ ." Files in directory (F): ";
+ my $answer = <>;
+ if ($answer =~ /F|f/){
+ system("rm -rf $file/*");
+ } elsif ($answer =~ /D|d/){
+ if (y_or_n("Do you want to erase the entire $print_dir directory?")){
+ system("rm -rf $file");
+ print("Directory erased\n");
+ }
+ } else {
+ print "Unsupported operation\n";
}
} elsif (-f $file) {
my $print_file = conv_file_to_rel($topdir,$file);