mirror of
https://github.com/zen-browser/surfer.git
synced 2025-07-09 17:55:32 +02:00
✨ Debian option for bootstrap
This commit is contained in:
parent
a9ed3f4a6e
commit
4a13e8afa3
2 changed files with 30 additions and 1 deletions
|
@ -1,10 +1,11 @@
|
||||||
/// <reference path="./linus.d.ts"/>
|
/// <reference path="./linus.d.ts"/>
|
||||||
|
|
||||||
import distro from 'linus'
|
import distro from 'linus'
|
||||||
import { bin_name , log } from '..'
|
import { bin_name, log } from '..'
|
||||||
import { ENGINE_DIR } from '../constants'
|
import { ENGINE_DIR } from '../constants'
|
||||||
import { dispatch } from '../utils'
|
import { dispatch } from '../utils'
|
||||||
import { pacmanInstall } from './bootstrap/arch'
|
import { pacmanInstall } from './bootstrap/arch'
|
||||||
|
import { aptInstall } from './bootstrap/debian'
|
||||||
|
|
||||||
export const bootstrap = async () => {
|
export const bootstrap = async () => {
|
||||||
if (process.platform == 'win32')
|
if (process.platform == 'win32')
|
||||||
|
@ -74,6 +75,29 @@ async function linuxBootstrap() {
|
||||||
)
|
)
|
||||||
break
|
break
|
||||||
|
|
||||||
|
case 'Debian':
|
||||||
|
case 'Ubuntu':
|
||||||
|
case 'Pop':
|
||||||
|
console.log(
|
||||||
|
await aptInstall(
|
||||||
|
'python3-distutils',
|
||||||
|
'libssl-dev',
|
||||||
|
'build-essential',
|
||||||
|
'libpulse-dev',
|
||||||
|
'clang',
|
||||||
|
'nasm',
|
||||||
|
'libpango1.0-dev',
|
||||||
|
'libx11-dev',
|
||||||
|
'libx11-xcb-dev',
|
||||||
|
'libgtk-3-dev',
|
||||||
|
'm4',
|
||||||
|
'libgtk2.0-dev',
|
||||||
|
'libdbus-glib-1-dev',
|
||||||
|
'libxt-dev'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
break
|
||||||
|
|
||||||
default:
|
default:
|
||||||
log.error(`Unimplemented distro '${distro}'`)
|
log.error(`Unimplemented distro '${distro}'`)
|
||||||
}
|
}
|
||||||
|
|
5
src/commands/bootstrap/debian.ts
Normal file
5
src/commands/bootstrap/debian.ts
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
import execa from 'execa'
|
||||||
|
|
||||||
|
export async function aptInstall(...packages: string[]): Promise<string> {
|
||||||
|
return (await execa('sudo', ['apt', 'install', '-y', ...packages])).stdout
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue