Clover icon

Coverage Report

  1. Project Clover database Thu Nov 7 2024 17:01:39 GMT
  2. Package jalview.bin

File GetdownLauncherUpdate.java

 

Coverage histogram

../../img/srcFileCovDistChart0.png
0% of files have more coverage

Code metrics

18
22
1
1
75
51
11
0.5
22
1
11

Classes

Class Line # Actions
GetdownLauncherUpdate 28 22 11
0.00%
 

Contributing tests

No tests hitting this source file were found.

Source view

1    /*
2    * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3    * Copyright (C) $$Year-Rel$$ The Jalview Authors
4    *
5    * This file is part of Jalview.
6    *
7    * Jalview is free software: you can redistribute it and/or
8    * modify it under the terms of the GNU General Public License
9    * as published by the Free Software Foundation, either version 3
10    * of the License, or (at your option) any later version.
11    *
12    * Jalview is distributed in the hope that it will be useful, but
13    * WITHOUT ANY WARRANTY; without even the implied warranty
14    * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15    * PURPOSE. See the GNU General Public License for more details.
16    *
17    * You should have received a copy of the GNU General Public License
18    * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19    * The Jalview Authors are detailed in the 'AUTHORS' file.
20    */
21    package jalview.bin;
22   
23    import java.io.File;
24   
25    import com.threerings.getdown.data.EnvConfig;
26    import com.threerings.getdown.util.LaunchUtil;
27   
 
28    public class GetdownLauncherUpdate
29    {
 
30  0 toggle public static void main(String[] args)
31    {
32  0 EnvConfig.setVarsFromProperties();
33   
34  0 String appdir = args.length > 0 ? args[0] : null;
35  0 if (appdir == null || appdir.length() == 0)
36    {
37  0 appdir = System.getProperty("launcher.appdir", null);
38    }
39  0 if (appdir == null)
40    {
41  0 appdir = EnvConfig.getUserAppdir();
42    }
43  0 if (appdir == null)
44    {
45  0 System.err.println("Not running upgradeGetdown");
46  0 return;
47    }
48  0 boolean debug = false;
49  0 for (int i = 0; i < args.length; i++)
50    {
51  0 if ("--debug".equals(args[i]))
52    {
53  0 debug = true;
54  0 break;
55    }
56    }
57  0 if (debug)
58    {
59  0 System.err.println("Running upgradeGetdown");
60    }
61  0 File appdirFile = new File(appdir);
62  0 if (!appdirFile.exists())
63    {
64  0 System.err.println("Directory '" + appdirFile.getAbsolutePath()
65    + "' doesn't exist, cannot update getdown-launcher.jar.");
66  0 if (Boolean.valueOf(System.getProperty("launcher.update")))
67    {
68  0 System.exit(1);
69    }
70    }
71  0 LaunchUtil.upgradeGetdown(new File(appdir, "getdown-launcher-old.jar"),
72    new File(appdir, "getdown-launcher.jar"),
73    new File(appdir, "getdown-launcher-new.jar"));
74    }
75    }