Last active
December 31, 2015 06:19
-
-
Save etexier/7947030 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (c) 2013 Magnet Systems, Inc. All rights reserved. | |
*/ | |
package patch | |
import com.magnet.tools.cli.AbstractCommand | |
/** | |
*/ | |
class InstallHelpPatch extends AbstractCommand { | |
private final String PATCH_URL = "https://gist.github.com/etexier/7947015/raw/7683434fcd65669f6f191e20ba9da0dbb956cae9/patch.properties" | |
InstallHelpPatch() { | |
super('install-help-patch', true) | |
} | |
@Override | |
def execute(List<String> args) { | |
File dir = shell.getConfiguration().installationDirectory.getCanonicalFile() | |
println (dir) | |
def configDir = new File(dir, "config") | |
def usages = new File(configDir, "usages") | |
usages.mkdirs() | |
logWarning("Installing patch for register command help") | |
URL url = getURL(PATCH_URL) | |
def patchFile = new File(usages, "RegisterCommand_en_US.properties") | |
patchFile << url.text | |
logWarning("help patched!") | |
shell << "register -u install-help-patch" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment