Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
I
inary
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
1
Konular (issue)
1
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
SulinOS
inary
Commits
f36ec604
Kaydet (Commit)
f36ec604
authored
Agu 30, 2021
tarafından
root
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
autobuilder
üst
595d76d3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
83 additions
and
0 deletions
+83
-0
autobuilder.py
inary/actionsapi/autobuilder.py
+76
-0
shelltools.py
inary/actionsapi/shelltools.py
+7
-0
No files found.
inary/actionsapi/autobuilder.py
0 → 100644
Dosyayı görüntüle @
f36ec604
# -*- coding: utf-8 -*-
#
# Main fork Pisi: Copyright (C) 2005 - 2011, Tubitak/UEKAE
#
# Copyright (C) 2016 - 2020, Suleyman POYRAZ (Zaryob)
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 3 of the License, or (at your option)
# any later version.
#
# Please read the COPYING file.
# Inary Modules
import
inary.context
as
ctx
from
inary.util
import
colorize
from
inary.util
import
join_path
# ActionsAPI Modules
from
inary.actionsapi
import
error
# Standart Python Modules
import
os
import
grp
import
pwd
import
sys
import
glob
import
shutil
from
inary.actionsapi.shelltools
import
can_access_file
import
inary.actionsapi.autotools
as
autotools
import
inary.actionsapi.cmaketools
as
cmaketools
import
inary.actionsapi.mesontools
as
mesontools
# Gettext Library
import
gettext
__trans
=
gettext
.
translation
(
'inary'
,
fallback
=
True
)
_
=
__trans
.
gettext
def
configure
(
args
=
''
):
"""Autobuilder setup"""
if
can_access_file
(
"autogen.sh"
):
autotools
.
autogen
(
args
)
if
can_access_file
(
"configure"
):
autotools
.
configure
(
args
)
if
can_access_file
(
"meson.build"
):
mesontools
.
configure
(
args
)
if
can_access_file
(
"CmakeLists.txt"
):
cmaketools
.
configure
(
args
)
def
make
(
args
=
''
):
"""Autobuilder build"""
if
can_access_file
(
"autogen.sh"
):
autotools
.
make
(
args
)
if
can_access_file
(
"Makefile"
):
autotools
.
make
(
args
)
if
can_access_file
(
"meson.build"
):
mesontools
.
make
(
args
)
if
can_access_file
(
"CmakeLists.txt"
):
cmaketools
.
make
(
args
)
def
install
(
args
=
''
):
"""Autobuilder install"""
if
can_access_file
(
"autogen.sh"
):
autotools
.
install
(
args
)
if
can_access_file
(
"Makefile"
):
autotools
.
install
(
args
)
if
can_access_file
(
"meson.build"
):
mesontools
.
install
(
args
)
if
can_access_file
(
"CmakeLists.txt"
):
cmaketools
.
install
(
args
)
setup
=
configure
()
build
=
make
()
inary/actionsapi/shelltools.py
Dosyayı görüntüle @
f36ec604
...
...
@@ -274,6 +274,13 @@ def export(key, value):
"""export environ variable"""
os
.
environ
[
str
(
key
)]
=
str
(
value
)
def
reset_env
():
_env
=
os
.
environ
.
copy
()
os
.
environ
.
clear
()
for
key
in
[
"PATH"
,
"HOST"
,
"CC"
,
"CXX"
]:
os
.
environ
[
key
]
=
_env
[
key
]
return
_env
def
isLink
(
filePath
):
"""return True if filePath refers to a symbolic link"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment