linux: Move help options to startup script
This commit is contained in:
parent
5f6153e8b3
commit
32b46c27fd
|
@ -35,14 +35,6 @@ namespace SparkleShare {
|
||||||
#endif
|
#endif
|
||||||
public static void Main (string [] args)
|
public static void Main (string [] args)
|
||||||
{
|
{
|
||||||
if (args.Length != 0 && (args [0].Equals ("help") || args [0].Equals ("version")) &&
|
|
||||||
InstallationInfo.OperatingSystem != OS.macOS &&
|
|
||||||
InstallationInfo.OperatingSystem != OS.Windows) {
|
|
||||||
|
|
||||||
DisplayHelp ();
|
|
||||||
Environment.Exit (0);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Only allow one instance of SparkleShare (on Windows)
|
// Only allow one instance of SparkleShare (on Windows)
|
||||||
if (!program_mutex.WaitOne (0, exitContext: false)) {
|
if (!program_mutex.WaitOne (0, exitContext: false)) {
|
||||||
Console.WriteLine ("SparkleShare is already running.");
|
Console.WriteLine ("SparkleShare is already running.");
|
||||||
|
@ -65,22 +57,6 @@ namespace SparkleShare {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void DisplayHelp ()
|
|
||||||
{
|
|
||||||
string n = Environment.NewLine;
|
|
||||||
|
|
||||||
Console.WriteLine (n +
|
|
||||||
"Share and collaborate by syncing with any Git repository instantly." + n +
|
|
||||||
n +
|
|
||||||
"Version: " + InstallationInfo.Version + n +
|
|
||||||
"Copyright (C) 2010 Hylke Bons and others" + n +
|
|
||||||
"This program comes with ABSOLUTELY NO WARRANTY." + n +
|
|
||||||
n +
|
|
||||||
"This is free software, and you are welcome to redistribute it" + n +
|
|
||||||
"under certain conditions. Please read the GNU GPLv3 for details." + n);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void OnUnhandledException (object sender, UnhandledExceptionEventArgs exception_args)
|
static void OnUnhandledException (object sender, UnhandledExceptionEventArgs exception_args)
|
||||||
{
|
{
|
||||||
var exception = (Exception) exception_args.ExceptionObject;
|
var exception = (Exception) exception_args.ExceptionObject;
|
||||||
|
|
|
@ -12,8 +12,25 @@ case $1 in
|
||||||
curl --insecure --output ~/SparkleShare/.$invite.xml $open
|
curl --insecure --output ~/SparkleShare/.$invite.xml $open
|
||||||
mono "@ABS_INSTALL_DIR@/SparkleShare.exe"
|
mono "@ABS_INSTALL_DIR@/SparkleShare.exe"
|
||||||
;;
|
;;
|
||||||
help|--help|version|--version)
|
version|--version)
|
||||||
mono "@ABS_INSTALL_DIR@/SparkleShare.exe" help
|
echo @VERSION@
|
||||||
|
;;
|
||||||
|
help|--help)
|
||||||
|
echo
|
||||||
|
echo "Share and collaborate by syncing with any Git repository instantly."
|
||||||
|
echo
|
||||||
|
echo "Version: @VERSION@"
|
||||||
|
echo "Copyright (C) 2010 Hylke Bons and others" + n +
|
||||||
|
echo "This program comes with ABSOLUTELY NO WARRANTY." + n +
|
||||||
|
echo
|
||||||
|
echo "This is free software, and you are welcome to redistribute it"
|
||||||
|
echo "under certain conditions. Please read the GNU GPLv3 for details."
|
||||||
|
echo
|
||||||
|
echo "Usage: sparkelshare [options]"
|
||||||
|
echo
|
||||||
|
echo "Options:"
|
||||||
|
echo " --open sparkleshare://<URL> Opens an invite"
|
||||||
|
echo " --status-icon=[gtk|appindicator] Use a specific statusicon implementation"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
mono "@ABS_INSTALL_DIR@/SparkleShare.exe" $1
|
mono "@ABS_INSTALL_DIR@/SparkleShare.exe" $1
|
||||||
|
|
|
@ -91,5 +91,8 @@
|
||||||
</Compile>
|
</Compile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup />
|
<ItemGroup />
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="InstallationInfo.Directory.cs.in" />
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
</Project>
|
</Project>
|
Loading…
Reference in a new issue