summaryrefslogtreecommitdiffhomepage
path: root/updater/updater.py
blob: 224325e43a95fbdf3c07ec58fe69681446e77c47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Copyright 2026, Amlal El Mahrouss and Ne.org contributors.
# NeSystem is licensed under Apache-2.0.
# SPDX-Identifier: Apache-2.0

# -*- coding: utf-8 -*-

import os

class UpdateFunctor:
    def __init__(self):
        os.system("cd src && cd kernel && git pull && cd ..")
        os.system("cd src && cd nectar && git pull && cd ..")
        os.system("cd src && cd build && git pull && cd ..")
        os.system("cd src && cd boot && git pull && cd ..")
        os.system("cd papers && git pull")
        os.system("git add src/kernel src/nectar papers src/build src/boot")
        if (os.environ.get('UPDATER_NO_COMMIT', False) == False):
            os.system("git commit -s -S")

def start():
    functor = UpdateFunctor()
    print("INFO: Updater: Functor called")