Skip to content

Commit

Permalink
feat: should use correct architecture (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tienisto authored Jan 7, 2024
1 parent bacaf33 commit 190fab5
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ class MakeDebConfig extends MakeLinuxPackageConfig {
'Version': appVersion.toString(),
'Section': section,
'Priority': priority,
'Architecture': 'amd64',
'Architecture': _getArchitecture(),
'Essential':
essential != null ? (essential == true ? 'yes' : 'no') : null,
'Installed-Size': installedSize,
Expand Down Expand Up @@ -368,3 +368,12 @@ class MakeDebConfigLoader extends DefaultMakeConfigLoader {
return MakeDebConfig.fromJson(map).copyWith(baseMakeConfig);
}
}

String _getArchitecture() {
final result = Process.runSync('uname', ['-m']);
if ('${result.stdout}'.trim() == 'aarch64') {
return 'arm64';
} else {
return 'amd64';
}
}

0 comments on commit 190fab5

Please sign in to comment.