Created
September 20, 2013 19:38
-
-
Save Red-Folder/6642733 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
$classpathfile = ".classpath" | |
$pluginversion = (get-item env:"PLUGINVERSION").Value | |
$cordovaversion = (get-item env:"CORDOVAVERSION").Value | |
$pluginlibrarypath = "libs/backgroundserviceplugin-" + $pluginversion + ".jar" | |
$cordovalibrarypath = "libs/cordova-" + $cordovaversion + ".jar" | |
Write-Host("Plugin Version: {0}" -f $pluginversion) | |
Write-Host("Cordova Version: {0}" -f $cordovaversion) | |
Write-Host("Library Path: {0}" -f $librarypath) | |
$doc = [xml](Get-Content -Path $classpathfile) | |
foreach($classpathentry in $doc.classpath.ChildNodes) | |
{ | |
if ($classpathentry.path.contains("cordova")) { | |
$classpathentry.path = $cordovalibrarypath | |
} | |
if ($classpathentry.path.contains("backgroundserviceplugin")) { | |
$classpathentry.path = $pluginlibrarypath | |
} | |
} | |
$doc.Save($classpathfile) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment