优化部分os_custom生成方式

This commit is contained in:
陌生人 2024-11-18 13:42:40 +08:00 committed by wangpenglong
parent 9740b7b5c4
commit 029fa85690
1 changed files with 5 additions and 6 deletions

View File

@ -92,18 +92,17 @@ function getFileData() {
if (os_info['milestone'].indexOf('release')) {
os_release = os_info['milestone'].slice(os_info['milestone'].indexOf('release') + 8);
}
let osCustomList = ['gen'];
if (os_info['dist_id'].includes('edu')) {
os_info['custom'] = 'edu';
} else {
os_info['custom'] = 'gen';
osCustomList = ['edu'];
}
if (os_info['dist_id'].includes('hwe')) {
os_info['custom'] += 'hwe';
osCustomList.push('hwe');
}
if (os_info['dist_id'].includes('gfb')) {
os_info['custom'] += 'gfb'
osCustomList.push('gfb')
}
os_info['custom'] = osCustomList.join('');
} catch (err) {
os_info['info'] = "";
console.log(err);