2017-11-01 12:05:11 +01:00
|
|
|
const sh = require('shelljs');
|
|
|
|
|
2018-04-06 21:09:12 -07:00
|
|
|
const PATCH_LOCK = 'node_modules/@angular/cli/.patched';
|
2017-11-01 12:05:11 +01:00
|
|
|
|
2020-07-02 20:00:24 +03:00
|
|
|
sh.set('-e');
|
|
|
|
sh.cd(`${__dirname}/../../`);
|
|
|
|
|
|
|
|
if (!sh.test('-f', PATCH_LOCK)) {
|
|
|
|
sh.ls('-l', __dirname)
|
|
|
|
.filter(stat => stat.isFile() && /\.patch$/i.test(stat.name))
|
|
|
|
.forEach(stat => sh.exec(`patch -p0 -i "${__dirname}/${stat.name}"`));
|
|
|
|
|
2017-11-01 12:05:11 +01:00
|
|
|
sh.touch(PATCH_LOCK);
|
|
|
|
}
|