2017-11-01 07:05:11 -04:00
|
|
|
const sh = require('shelljs');
|
|
|
|
|
2018-04-07 00:09:12 -04:00
|
|
|
const PATCH_LOCK = 'node_modules/@angular/cli/.patched';
|
2017-11-01 07:05:11 -04:00
|
|
|
|
2020-07-02 13:00:24 -04: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 07:05:11 -04:00
|
|
|
sh.touch(PATCH_LOCK);
|
|
|
|
}
|