[Swift-commit] r3545 - in usertools/swift/swiftconfig: bin lib/perl
noreply at svn.ci.uchicago.edu
noreply at svn.ci.uchicago.edu
Mon Aug 16 13:49:25 CDT 2010
Author: davidk
Date: 2010-08-16 13:49:25 -0500 (Mon, 16 Aug 2010)
New Revision: 3545
Modified:
usertools/swift/swiftconfig/bin/swiftconfig
usertools/swift/swiftconfig/lib/perl/SwiftConfig.pm
Log:
Remove version restrictions
Modified: usertools/swift/swiftconfig/bin/swiftconfig
===================================================================
--- usertools/swift/swiftconfig/bin/swiftconfig 2010-08-16 18:17:07 UTC (rev 3544)
+++ usertools/swift/swiftconfig/bin/swiftconfig 2010-08-16 18:49:25 UTC (rev 3545)
@@ -19,7 +19,6 @@
my $option_list = q{}; # List information about config
my $option_remove = q{}; # Remove entry from sites.xml
my $option_edit = q{}; # Edit mode
-my $option_sites = q{}; # List all usable sites
my $option_describe = q{}; # Print raw XML configuration
my $option_default = q{}; # When adding a site, use all defaults
my $option_template = q{}; # Create config from template specified
@@ -30,7 +29,6 @@
# Assign variables from command line options
GetOptions(
'remove=s' => \$option_remove,
- 'sites' => \$option_sites,
'describe=s' => \$option_describe,
'default|defaults' => \$option_default,
'full' => sub { $option_default = 0; },
@@ -108,11 +106,6 @@
. "$dotswift_directory/sites/$option_remove\n";
}
-# List all user-added sites
-if ($option_sites) {
- print_directory("$dotswift_directory/sites");
-}
-
# Modify a site entry
if ($option_edit) {
my $output_directory = "$dotswift_directory/sites/$option_edit";
@@ -323,7 +316,6 @@
-template sitename Add a configuration based on a template
-remove site Removes a site configuration
-templates Display all available templates
- -sites Displays all existing configurations
-edit site Specifies the name of a configuration to edit
-copy site Copies a configuration
-default Do not prompt for values, always use defaults
Modified: usertools/swift/swiftconfig/lib/perl/SwiftConfig.pm
===================================================================
--- usertools/swift/swiftconfig/lib/perl/SwiftConfig.pm 2010-08-16 18:17:07 UTC (rev 3544)
+++ usertools/swift/swiftconfig/lib/perl/SwiftConfig.pm 2010-08-16 18:49:25 UTC (rev 3545)
@@ -1,6 +1,5 @@
package SwiftConfig;
-use 5.010001;
use strict;
use warnings;
@@ -555,12 +554,13 @@
return;
}
- if(-e "$ENV{'HOME'}/.swift/sites/apps") {
- open(APPLIST, "$ENV{'HOME'}/.swift/sites/apps")
- || die "Unable to open app list $ENV{'HOME'}/.swift/sites/apps";
+ if(-e "$ENV{'HOME'}/.swift/sites/$site/apps") {
+ open(APPLIST, "$ENV{'HOME'}/.swift/sites/$site/apps")
+ || die "Unable to open app list $ENV{'HOME'}/.swift/sites/$site/apps";
my @apps_file_data = <APPLIST>;
close(APPLIST);
foreach my $current_app (@apps_file_data) {
+ print "Looking at: $current_app\n";
if($apps) {
$apps = "$apps $current_app";
}
@@ -569,6 +569,7 @@
}
}
}
+ print "Apps: $apps\n";
my @all_available_appsets = glob("$ENV{'HOME'}/.swift/apps/*.apps");
print "Available application sets are: ";
@@ -579,9 +580,7 @@
}
print "\n";
- print "Enter application sets for $site: ";
- $apps = <STDIN>;
- chomp($apps);
+ $apps = get_entry("Application sets for $site", $apps, 0);
my @all_list = split(/ /, $apps);
open(APPFILE, ">$ENV{'HOME'}/.swift/sites/$site/apps")
|| die "Unable to open $ENV{'HOME'}/.swift/sites/$site/apps for writing!\n";
More information about the Swift-commit
mailing list