添加统一更新版本的方法

This commit is contained in:
Vanessa 2012-07-25 16:54:38 +08:00
parent 963d609e62
commit b042a36c6d
2 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,22 @@
var version = "",
newVersion = "";
process.argv.forEach(function (val, index, array) {
if (index === 2) {
version = val;
}
if (index === 3) {
newVersion = val;
}
});
var fs = require("fs");
var skins = ["andrea", "classic", "community", "favourite", "i-nove", "neoease", "owmx-3.0", "tree-house"];
for (var i = 0; i < skins.length; i++) {
var fileName = "../../" + skins[i] + "/skin.properties";
var file = fs.readFileSync(fileName, "UTF-8");
fs.writeFileSync(fileName, file.replace("forSolo=" + version, "forSolo=" + newVersion), "UTF-8");
}