Skip to content

Commit

Permalink
Removed extra root directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanSweet committed Nov 11, 2013
1 parent 9706619 commit dca42f9
Show file tree
Hide file tree
Showing 16 changed files with 2,376 additions and 2,369 deletions.
26 changes: 13 additions & 13 deletions scar/.classpath → .classpath
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding="**/.svn/*" kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry exported="true" kind="lib" path="lib/JLzma.jar"/>
<classpathentry exported="true" kind="lib" path="lib/minlog-1.2.jar"/>
<classpathentry kind="lib" path="lib/commons-net-ftp-2.0.jar"/>
<classpathentry kind="lib" path="lib/yamlbeans-1.05.jar"/>
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/wildcard"/>
<classpathentry kind="lib" path="lib/wildcard-1.03.jar"/>
<classpathentry kind="lib" path="lib/jsch-0.1.49.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding="**/.svn/*" kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry exported="true" kind="lib" path="lib/JLzma.jar"/>
<classpathentry exported="true" kind="lib" path="lib/minlog-1.2.jar"/>
<classpathentry kind="lib" path="lib/commons-net-ftp-2.0.jar"/>
<classpathentry kind="lib" path="lib/yamlbeans-1.05.jar"/>
<classpathentry combineaccessrules="false" exported="true" kind="src" path="/wildcard"/>
<classpathentry kind="lib" path="lib/wildcard-1.03.jar"/>
<classpathentry kind="lib" path="lib/jsch-0.1.49.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Temporary Files
*~
.*.swp
.DS_STORE

bin/
target/
34 changes: 17 additions & 17 deletions scar/.project → .project
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>scar</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>scar</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
File renamed without changes.
2 changes: 1 addition & 1 deletion scar/dist/scar.bat → dist/scar.bat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
java -jar "%~dp0scar.jar"
java -jar "%~dp0scar.jar"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions scar/project.yaml → project.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
main: com.esotericsoftware.scar.Build
version: 1.09
---
Build.build(project);
Build.oneJAR(project);
main: com.esotericsoftware.scar.Build
version: 1.09
---
Build.build(project);
Build.oneJAR(project);
Original file line number Diff line number Diff line change
@@ -1,90 +1,90 @@

package com.esotericsoftware.scar;

import java.util.LinkedHashMap;

/**
* Stores command line arguments as name/value pairs. Arguments containing an equals sign are considered a name/value pair. All
* other arguments are stored as a name/value pair with a null value.
*/
public class Arguments {
private final LinkedHashMap<String, String> parameters = new LinkedHashMap();

public Arguments () {
}

public Arguments (String[] args) {
this(args, 0);
}

public Arguments (String[] args, int startIndex) {
for (int i = startIndex; i < args.length; i++) {
String[] nameValuePair = args[i].split("=", 2);
if (nameValuePair.length == 2)
parameters.put(nameValuePair[0], nameValuePair[1]);
else
parameters.put(args[i], null);
}
}

/**
* Returns true if the argument was specified.
*/
public boolean has (String name) {
if (name == null) throw new IllegalArgumentException("name cannot be null.");
return parameters.containsKey(name);
}

/**
* Returns the value of the argument with the specified name, or null if the argument was specified without a value or was not
* specified.
*/
public String get (String name) {
if (name == null) throw new IllegalArgumentException("name cannot be null.");
return parameters.get(name);
}

/**
* Returns the value of the argument with the specified name, or the specified default value if the argument was specified
* without a value or was not specified.
*/
public String get (String name, String defaultValue) {
String value = parameters.get(name);
if (value == null) return defaultValue;
return value;
}

public void set (String name) {
set(name, null);
}

public void set (String name, String value) {
if (name == null) throw new IllegalArgumentException("name cannot be null.");
parameters.put(name, value);
}

public int count () {
return parameters.size();
}

public String remove (String name) {
if (name == null) throw new IllegalArgumentException("name cannot be null.");
return parameters.remove(name);
}

public String toString () {
StringBuffer buffer = new StringBuffer(100);
for (String param : parameters.keySet()) {
if (buffer.length() > 1) buffer.append(' ');
String value = get(param);
if (value == null)
buffer.append(param);
else {
buffer.append(param);
buffer.append('=');
buffer.append(value);
}
}
return buffer.toString();
}
}

package com.esotericsoftware.scar;

import java.util.LinkedHashMap;

/**
* Stores command line arguments as name/value pairs. Arguments containing an equals sign are considered a name/value pair. All
* other arguments are stored as a name/value pair with a null value.
*/
public class Arguments {
private final LinkedHashMap<String, String> parameters = new LinkedHashMap();

public Arguments () {
}

public Arguments (String[] args) {
this(args, 0);
}

public Arguments (String[] args, int startIndex) {
for (int i = startIndex; i < args.length; i++) {
String[] nameValuePair = args[i].split("=", 2);
if (nameValuePair.length == 2)
parameters.put(nameValuePair[0], nameValuePair[1]);
else
parameters.put(args[i], null);
}
}

/**
* Returns true if the argument was specified.
*/
public boolean has (String name) {
if (name == null) throw new IllegalArgumentException("name cannot be null.");
return parameters.containsKey(name);
}

/**
* Returns the value of the argument with the specified name, or null if the argument was specified without a value or was not
* specified.
*/
public String get (String name) {
if (name == null) throw new IllegalArgumentException("name cannot be null.");
return parameters.get(name);
}

/**
* Returns the value of the argument with the specified name, or the specified default value if the argument was specified
* without a value or was not specified.
*/
public String get (String name, String defaultValue) {
String value = parameters.get(name);
if (value == null) return defaultValue;
return value;
}

public void set (String name) {
set(name, null);
}

public void set (String name, String value) {
if (name == null) throw new IllegalArgumentException("name cannot be null.");
parameters.put(name, value);
}

public int count () {
return parameters.size();
}

public String remove (String name) {
if (name == null) throw new IllegalArgumentException("name cannot be null.");
return parameters.remove(name);
}

public String toString () {
StringBuffer buffer = new StringBuffer(100);
for (String param : parameters.keySet()) {
if (buffer.length() > 1) buffer.append(' ');
String value = get(param);
if (value == null)
buffer.append(param);
else {
buffer.append(param);
buffer.append('=');
buffer.append(value);
}
}
return buffer.toString();
}
}
Loading

0 comments on commit dca42f9

Please sign in to comment.