Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
eouw0o83hf committed Mar 15, 2014
2 parents 9aca37f + 58fa913 commit 7d4970a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
1 change: 1 addition & 0 deletions Avalanche/Avalanche.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
Expand Down
24 changes: 15 additions & 9 deletions Avalanche/ExecutionParameters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ public void Initialize(string[] args)
var showHelp = false;
var options = new OptionSet
{
{ "gk|glacier-key", "Access Key ID for Amazon Glacier", a => Glacier.AccessKeyId = a },
{ "gs|glacier-secret", "Secret Access Key for Amazon Glacier", a => Glacier.SecretAccessKey = a },
{ "ga|glacier-account", "Account ID for Amazon Glacier", a => Glacier.AccountId = a },
{ "gsns|glacier-sns-topic", "SNS Topic ID for Amazon Glacier Job", a => Glacier.SnsTopicId = a },
{ "gv|glacier-vault", "Vault name for Amazon Glacier", a => Glacier.VaultName = a },
{ "gr|glacier-region", "Region for Glacier. Options are {APNortheast1, APSoutheast1, APSoutheast2, CNNorth1, EUWest1, SAEast1, USEast1, USGovCloudWest1, USWest1, USWest2}", a => Glacier.Region = a },
{ "lc|lightroom-catalog", "Path/File for Lightroom Catalog", a => Avalanche.CatalongFilePath = a },
{ "ad|avalanche-db", "Path/File for Avalanche DB", a => Avalanche.AvalancheFilePath = a },
{ "c|config-file", "Path/File for Avalanche Config File", a => ConfigFileLocation = a },
{ "gk=|glacier-key=", "Access Key ID for Amazon Glacier", a => Glacier.AccessKeyId = a },
{ "gs=|glacier-secret=", "Secret Access Key for Amazon Glacier", a => Glacier.SecretAccessKey = a },
{ "ga=|glacier-account=", "Account ID for Amazon Glacier", a => Glacier.AccountId = a },
{ "gt=|glacier-sns-topic=", "SNS Topic ID for Amazon Glacier Job", a => Glacier.SnsTopicId = a },
{ "gv=|glacier-vault=", "Vault name for Amazon Glacier", a => Glacier.VaultName = a },
{ "gr=|glacier-region=", "Region for Glacier. Options are {APNortheast1, APSoutheast1, APSoutheast2, CNNorth1, EUWest1, SAEast1, USEast1, USGovCloudWest1, USWest1, USWest2}", a => Glacier.Region = a },
{ "lc=|lightroom-catalog=", "Path/File for Lightroom Catalog", a => Avalanche.CatalongFilePath = a.Trim('"') },
{ "ad=|avalanche-db=", "Path/File for Avalanche DB", a => Avalanche.AvalancheFilePath = a.Trim('"') },
{ "c=|config-file=", "Path/File for Avalanche Config File", a => ConfigFileLocation = a.Trim('"') },
{ "h|help", "Help", a => showHelp = a != null }
};

Expand All @@ -65,6 +65,12 @@ public void Initialize(string[] args)
_log.Error(ex.Message);
Environment.Exit(0);
}

if (showHelp)
{
options.WriteOptionDescriptions(Console.Error);
Environment.Exit(0);
}
}

public static ExecutionParameters GetParametersFromArgs(string[] args)
Expand Down
1 change: 0 additions & 1 deletion Avalanche/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ public static void Main(string[] args)
}

_log.Info("Done");
Console.Read();
}
}
}
Expand Down

0 comments on commit 7d4970a

Please sign in to comment.