11 lines
297 B
JavaScript
11 lines
297 B
JavaScript
|
var redirects = require('./redirects.json');
|
||
|
|
||
|
redirects.forEach(function (r) {
|
||
|
var frompath = "'" + r.from.hostname + r.from.path + "'";
|
||
|
var topath = "'" + r.to.hostname + r.to.path.replace(/\//g, '#') + "'";
|
||
|
|
||
|
if (frompath !== topath) {
|
||
|
console.log("mv", frompath, " ", topath);
|
||
|
}
|
||
|
});
|