summaryrefslogtreecommitdiff
path: root/src/backend/setprofile.py
blob: 87d54375e18f907888c2e80682ad573a4c49dd2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/python3

import animation
import platform
import subprocess

@animation.wait('setting up profile')
def start():
    if platform.uname()[4] == 'x86_64':
        eselectExec = subprocess.Popen(['eselect', 'profile', 'set', 'default/linux/amd64/17.1/hardened'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
        stdout, stderr = eselectExec.communicate()

    if platform.uname()[4] == 'aarch64':
        eselectExec = subprocess.Popen(['eselect', 'profile', 'set', 'default/linux/arm64/17.0'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
        stdout, stderr = eselectExec.communicate()

    envExec = subprocess.Popen(['env-update'], stdout=subprocess.DEVNULL)
    envExec.wait()