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
bb781639
Kaydet (Commit)
bb781639
authored
Nis 03, 2021
tarafından
Your Name
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
configure fix
üst
9f533959
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
69 deletions
+60
-69
configure
configure
+60
-69
No files found.
configure
Dosyayı görüntüle @
bb781639
#!/bin/bash
set
-
e
set
-e
setcfg
(){
echo
- ne
"
$1
[y/n]"
read
- sn 1 c
echo
- ne
"
\0
33[32;1m(
$c
)
\0
33[;0m"
if
[
"
$c
"
==
"y"
]
| |
[
"
$c
"
==
"Y"
]
then
echo
-ne
"
$1
[y/n]"
read
-sn
1 c
echo
-ne
"
\0
33[32;1m(
$c
)
\0
33[;0m"
if
[
"
$c
"
==
"y"
]
||
[
"
$c
"
==
"Y"
]
;
then
echo
"
$2
=y"
>>
.config
else
echo
"
$2
=n"
>>
.config
fi
echo
}
defconfig
=
"ny"
defconfig
=
"ny"
ask_cfg
(){
echo
-
e
"
\0
33[34;1mInary configure :
\0
33[;0m"
echo
-e
"
\0
33[34;1mInary configure :
\0
33[;0m"
echo
"#inary config file"
>
.config
setcfg
"Native language support"
"NLS_SUPPORT"
setcfg
"Additional scripts"
"ADDITIONAL_SCRIPTS"
echo
-
e
"
\0
33[33;1m
\"
.config
\"
file changed.
\0
33[;0m"
echo
-e
"
\0
33[33;1m
\"
.config
\"
file changed.
\0
33[;0m"
}
ask_check
(){
echo
-
e
"
\0
33[34;1mInary check :
\0
33[;0m"
chkfile
"/dev/null"
chkfile
"/usr/bin/"
chkfile
"/var/lib/"
chkfile
"/usr/lib/"
chkfile
"/etc/"
chkcmd
"python3"
& & chkcmd
"python3.8"
|
| chkcmd
"python3.7"
chkcmd
"intltool-extract"
chkcmd
"xgettext"
chkcmd
"msgfmt"
echo
-
e
"
\0
33[34;1mInary check :
\0
33[;0m"
chkfile
"/dev/null"
chkfile
"/usr/bin/"
chkfile
"/var/lib/"
chkfile
"/usr/lib/"
chkfile
"/etc/"
chkcmd
"python3"
&&
chkcmd
"python3.8"
|
|
chkcmd
"python3.7"
chkcmd
"intltool-extract"
chkcmd
"xgettext"
chkcmd
"msgfmt"
}
chkcmd
(){
echo
- ne
"checking
$1
"
if
which
$1
&
>
/dev/null
then
echo
- e
"
\0
33[32;1m(yes)
\0
33[;0m"
echo
-ne
"checking
$1
"
if
which
$1
&>/dev/null
;
then
echo
-e
"
\0
33[32;1m(yes)
\0
33[;0m"
else
echo
-
e
"
\0
33[33;1m(no)
\0
33[;0m"
echo
-
e
"
\0
33[32;1mERROR:
\0
33[;0m
$1
not found in
\$
PATH"
echo
-
e
"
\0
33[33;1m(no)
\0
33[;0m"
echo
-
e
"
\0
33[32;1mERROR:
\0
33[;0m
$1
not found in
\$
PATH"
return
1
fi
}
chkfile
(){
echo
- ne
"checking
$1
"
if
[
-e
"
$1
"
]
then
echo
- e
"
\0
33[32;1m(yes)
\0
33[;0m"
echo
-ne
"checking
$1
"
if
[
-e
"
$1
"
]
;
then
echo
-e
"
\0
33[32;1m(yes)
\0
33[;0m"
else
echo
-
e
"
\0
33[33;1m(no)
\0
33[;0m"
echo
-
e
"
\0
33[32;1mERROR:
\0
33[;0m
$1
not found."
echo
-
e
"
\0
33[33;1m(no)
\0
33[;0m"
echo
-
e
"
\0
33[32;1mERROR:
\0
33[;0m
$1
not found."
return
1
fi
}
yes
(){
while
true
do
echo
- ne
"
$1
"
while
true
;
do
echo
-ne
"
$1
"
done
}
usage
(){
cat
<<
EOF
./configure
[OPTIONS]
cat
<<
EOF
./configure
[OPTIONS]
Options list:
Options list:
--yes-all
: Enable all
- -no-all
: Disable all
- -default
: Use default config
--yes-all
: Enable all
--no-all
: Disable all
--default
: Use default config
- -help
: Show this message
- -clean
: Delete .config file
--help
: Show this message
--clean
: Delete .config file
EOF
EOF
}
for
i
in
$@
do
if
[
"
$i
"
==
"--yes-all"
]
then
ask_check
yes
y | ask_cfg
exit
0
elif
[
"
$i
"
==
"--no-all"
]
then
ask_check
yes
n | ask_cfg
exit
0
elif
[
"
$i
"
==
"--clean"
]
then
[
-f
.config] & &
rm
- f .config
exit
0
elif
[
"
$i
"
==
"--default"
]
then
ask_check
echo
"
$defconfig
"
| ask_cfg
exit
0
elif
[
"
$i
"
==
"--help"
]
then
usage
exit
0
fi
for
i
in
$@
;
do
if
[
"
$i
"
==
"--yes-all"
]
;
then
ask_check
yes
y | ask_cfg
exit
0
elif
[
"
$i
"
==
"--no-all"
]
;
then
ask_check
yes
n | ask_cfg
exit
0
elif
[
"
$i
"
==
"--clean"
]
;
then
[
-f
.config
]
&&
rm
-f
.config
exit
0
elif
[
"
$i
"
==
"--default"
]
;
then
ask_check
echo
"
$defconfig
"
| ask_cfg
exit
0
elif
[
"
$i
"
==
"--help"
]
;
then
usage
exit
0
fi
done
ask_cfg
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