Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
U
unibuild
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)
0
Konular (issue)
0
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
unibuild
Commits
0a31e2a4
Kaydet (Commit)
0a31e2a4
authored
Mar 26, 2021
tarafından
root
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
posthooks added
üst
ee4f5b72
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
73 additions
and
31 deletions
+73
-31
00-loggers
src/api/00-loggers
+4
-1
import-source
src/api/import-source
+11
-0
run-function
src/api/run-function
+9
-0
check-broken
src/posthooks/check-broken
+6
-0
la-remove
src/posthooks/la-remove
+9
-0
optipng
src/posthooks/optipng
+8
-0
set-executable-libraries
src/posthooks/set-executable-libraries
+11
-0
unibuild.sh
src/unibuild.sh
+15
-30
No files found.
src/api/00-loggers
Dosyayı görüntüle @
0a31e2a4
...
...
@@ -12,4 +12,7 @@ err(){
info
(){
echo
-e
"
\0
33[34;1m
$*
\0
33[;0m"
}
fail_message
()
{
err
"
$@
"
exit
1
}
src/api/import-source
0 → 100644
Dosyayı görüntüle @
0a31e2a4
#!/bin/bash
import_source
(){
if
[
-f
"
$1
"
]
||
[
"$#"
==
"0"
]
;
then
source
<
(
cat
$1
)
elif
echo
"
$1
"
|
grep
"^.*://"
&>/dev/null
;
then
source
<
(
curl
$1
)
else
err
"Source not detected or not supported."
exit
1
fi
}
src/api/run-function
0 → 100644
Dosyayı görüntüle @
0a31e2a4
#!/bin/bash
run_function
(){
fnc
=
"
$1
"
if
fn_exists
"_
$fnc
"
;
then
cd
$WORKDIR
msg
">>> Running
$fnc
function"
_
$fnc
||
fail_message
"Failed to run
$fnc
function."
fi
}
src/posthooks/check-broken
0 → 100644
Dosyayı görüntüle @
0a31e2a4
#!/bin/bash
[
"
$PKGS
"
==
""
]
&&
PKGS
=
$name
for
package
in
${
PKGS
[@]
}
;
do
export
INSTALLDIR
=
$BUILDDIR
/
$package
/install
find
-L
$INSTALLDIR
-type
l | xargs
echo
"Broken:"
done
src/posthooks/la-remove
0 → 100644
Dosyayı görüntüle @
0a31e2a4
#!/bin/bash
[
"
$PKGS
"
==
""
]
&&
PKGS
=
$name
for
package
in
${
PKGS
[@]
}
;
do
export
INSTALLDIR
=
$BUILDDIR
/
$package
/install
find
$INSTALLDIR
-type
f |
grep
"*.la"
|
while
read
line
;
do
msg
"Removed:
$line
"
rm
-f
$line
done
done
src/posthooks/optipng
0 → 100644
Dosyayı görüntüle @
0a31e2a4
#!/bin/bash
if
which optipng &>/dev/null
;
then
[
"
$PKGS
"
==
""
]
&&
PKGS
=
$name
for
package
in
${
PKGS
[@]
}
;
do
export
INSTALLDIR
=
$BUILDDIR
/
$package
/install
find
$INSTALLDIR
-type
f |
grep
"*.png"
| xargs optipng
-o7
done
fi
src/posthooks/set-executable-libraries
0 → 100644
Dosyayı görüntüle @
0a31e2a4
#!/bin/bash
[
"
$PKGS
"
==
""
]
&&
PKGS
=
$name
for
package
in
${
PKGS
[@]
}
;
do
export
INSTALLDIR
=
$BUILDDIR
/
$package
/install
find
$INSTALLDIR
-type
f |
grep
"*.so$"
|
while
read
line
;
do
if
[
-f
$line
]
;
then
msg
"Library detected:
$(
basename
"
$line
"
)
"
chmod
+x
$line
fi
done
done
src/unibuild.sh
Dosyayı görüntüle @
0a31e2a4
#!/bin/bash
$(
env
|
cut
-f
1
-d
'='
|
grep
-v
"TARGET"
|
grep
-v
"HOST"
|
grep
-v
"DISTRO"
|
sed
"s/^/unset /"
)
export
UNIBUILDRC
=
"
$HOME
/.unibuildrc"
$(
env
|
cut
-f
1
-d
'='
|
grep
-v
"TARGET"
|
grep
-v
"UNIBUILDRC"
|
grep
-v
"HOST"
|
grep
-v
"DISTRO"
|
sed
"s/^/unset /"
)
export
PATH
=
/bin:/sbin:/usr/bin:/usr/sbin
export
USER
=
unibuild
export
HOME
=
$(
mktemp
-d
)
export
SHELL
=
/bin/bash
declare
-r
unibuild_api_version
=
3
declare
-r
unibuild_api_version
=
4
declare
-r
inittime
=
$(
date
+%s%3N
)
[
-f
$HOME
/.unibuildrc
]
&&
source
$HOME
/.unibuildrc
[
-f
"
$UNIBUILDRC
"
]
&&
source
"
$UNIBUILDRC
"
[
"
$MODDIR
"
==
""
]
&&
export
MODDIR
=
/usr/lib/unibuild/modules
set
-e
for
api
in
$(
ls
$MODDIR
/../api |
sort
)
;
do
...
...
@@ -15,18 +16,7 @@ done
for
mod
in
$(
ls
$MODDIR
)
;
do
source
$MODDIR
/
$mod
done
if
[
-f
"
$1
"
]
||
[
"$#"
==
"0"
]
;
then
source
<
(
cat
$1
)
elif
echo
"
$1
"
|
grep
"^.*://"
&>/dev/null
;
then
source
<
(
curl
$1
)
else
err
"Source not detected or not supported."
exit
1
fi
fail_message
()
{
err
"
$@
"
exit
1
}
import_source
"
$1
"
source
$MODDIR
/../target/
$TARGET
source
$MODDIR
/../host/
$HOST
...
...
@@ -47,27 +37,17 @@ msg ">>> Running hooks"
for
hook
in
$(
ls
$MODDIR
/../hooks |
sort
)
;
do
source
$MODDIR
/../hooks/
$hook
done
if
fn_exists
"_setup"
;
then
cd
$WORKDIR
msg
">>> Running setup function"
_setup
||
fail_message
"Failed to run setup function."
fi
run_function setup
declare
-r
setuptime
=
$(
date
+%s%3N
)
if
fn_exists
"_build"
;
then
cd
$WORKDIR
msg
">>> Running build function"
_build
||
fail_message
"Failed to run build function."
fi
run_function build
declare
-r
buildtime
=
$(
date
+%s%3N
)
if
fn_exists
"_check"
;
then
cd
$WORKDIR
msg
">>> Running check function"
_build
||
warn
"Failed to run check function."
fi
run_function check
declare
-r
buildchecktime
=
$(
date
+%s%3N
)
[
"
$PKGS
"
==
""
]
&&
PKGS
=
$name
for
package
in
${
PKGS
[@]
}
;
do
export
PKGDIR
=
$BUILDDIR
/
$package
/package
...
...
@@ -80,6 +60,11 @@ for package in ${PKGS[@]} ; do
_install
||
fail_message
"Failed to run install function for
$package
"
fi
done
msg
">>> Running post hooks"
export
INSTALLDIR
=
$BUILDDIR
/
$package
/install
for
hook
in
$(
ls
$MODDIR
/../posthooks |
sort
)
;
do
source
$MODDIR
/../posthooks/
$hook
done
declare
-r
installtime
=
$(
date
+%s%3N
)
for
package
in
${
PKGS
[@]
}
;
do
export
name
=
$package
...
...
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