Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
ximper-builder
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ximper Linux
ximper-builder
Commits
404165d5
Commit
404165d5
authored
Nov 23, 2024
by
Кирилл Уницаев
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix shellcheck
parent
ba38bd59
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
26 deletions
+25
-26
build-distro
bin/build-distro
+10
-12
cleartmp
bin/cleartmp
+9
-8
gen-apt-conf
bin/gen-apt-conf
+6
-6
No files found.
bin/build-distro
View file @
404165d5
...
...
@@ -2,7 +2,7 @@
BUILDERDIR
=
$(
realpath
"
$(
dirname
"
$0
"
)
"
/..
)
DEBUG
=
false
#
DEBUG=false
ALLDISTROS
=
false
NVIDIA
=
false
VM
=
false
...
...
@@ -48,7 +48,7 @@ cleartmp() {
[
"
$CLEAN
"
==
true
]
||
return
echo
"____________________"
"
$BUILDERDIR
/bin"
/cleartmp
-i
"
$BUILDERDIR
"
/bin
/cleartmp
-i
# shellcheck disable=SC2012
# Удаляем все, кроме самого нового
[
"
$VER
"
==
"devel"
]
&&
ls
-t
"
$VMDIR
"
/ximper-
"
$desktop_env
""
$iso_suffix
"
-devel-
*
-x86_64
.iso |
tail
-n
+2 | xargs
-I
{}
rm
-v
--
{}
...
...
@@ -69,8 +69,9 @@ handle_uncommitted_changes() {
fi
# Обнаружены незакоммиченные изменения
# shellcheck disable=SC2155
local
temp_commit_msg
=
"TEMP: Commit before building
$(
date
+
'%Y-%m-%d %H:%M:%S'
)
"
local
temp_commit_msg
temp_commit_msg
=
"TEMP: Commit before building
$(
date
+
'%Y-%m-%d %H:%M:%S'
)
"
# Создание временного коммита
git add
-A
...
...
@@ -140,12 +141,10 @@ makebuild() {
revert_temp_commit
}
OPTS
=
$(
getopt
-o
h
--long
help
,nvidia,debug,clean,all,vm,gnome,hyprland,net,network,repos:
--
"
$@
"
)
# shellcheck disable=SC2181
if
[
$?
!=
0
]
;
then
OPTS
=
$(
getopt
-o
h
--long
help
,nvidia,debug,clean,all,vm,gnome,hyprland,net,network,repos:
--
"
$@
"
)
||
{
print_error
"Ошибка обработки опций."
exit
1
fi
}
# Применение параметров
eval set
--
"
$OPTS
"
...
...
@@ -155,7 +154,7 @@ while true; do
case
"
$1
"
in
-h
|
--help
)
printf
"
\n
"
printf
"Использование:
$0
[опции] [версия дистрибутива]
\n\n
"
printf
"Использование:
%s [опции] [версия дистрибутива]
\n\n
"
"
$0
"
printf
"Опции:
\n
"
printf
" -h | --help Вывод этой справки
\n
"
printf
" Окружения:
\n
"
...
...
@@ -178,7 +177,7 @@ while true; do
printf
" --debug Включить режим отладки
\n
"
printf
" --clean Очистить TMP перед сборкой
\n
"
printf
" --vm Собрать дистрибутив для виртуальной машины
\n
"
printf
" Перемещает готовый образ в
$VMDIR
\n
"
printf
" Перемещает готовый образ в
%s
\n
"
"
$VMDIR
"
exit
0
;;
--nvidia
)
...
...
@@ -187,7 +186,7 @@ while true; do
;;
--debug
)
echo
"ДЕБАГ ВКЛЮЧЕН"
DEBUG
=
true
#
DEBUG=true
shift
;;
--clean
)
...
...
@@ -240,7 +239,6 @@ fi
if
[
-z
"
$APTCONF
"
]
;
then
buildertmp
=
$(
create_tmp
)
APTCONF
=
$(
"
$BUILDERDIR
"
/bin/gen-apt-conf
$NETWORK
-d
"
$buildertmp
"
-r
"
$REPOS
"
)
APTTMP
=
$(
dirname
"
$APTCONF
"
)
fi
# Установить GNOME по умолчанию, если ничего не выбрано
...
...
bin/cleartmp
View file @
404165d5
#!/bin/bash
# базовые функции
.
$(
dirname
$0
)
/common
# shellcheck disable=SC1091
.
"
$(
dirname
"
$0
"
)
/common"
print_blue
"Очистка...."
if
[
-d
$PROFILESDIR
/build
]
;
then
pushd
PROFILESDIR
if
[
-d
"
$PROFILESDIR
"
/build
]
;
then
pushd
"
$PROFILESDIR
"
>
/dev/null
||
exit
make clean
rm
-rf
$TMP
/mkimage-profiles.build.
*
rm
-rf
"
$TMP
"
/mkimage-profiles.build.
*
rm
-rf
./build
popd
popd
>
/dev/null
||
exit
print_green
"mkimage-profiles очищен"
fi
rmiso
()
{
if
[
-d
$TMP
/out/
]
;
then
rm
-rf
$TMP
/out/
*
if
[
-d
"
$TMP
"
/out/
]
;
then
rm
-rf
"
$TMP
"
/out/
*
print_green
"iso файлы удалены"
fi
}
...
...
@@ -24,7 +25,7 @@ rmiso() {
for
param
in
"
$@
"
;
do
case
"
$param
"
in
-h
|
--help
)
printf
"Использование:
$0
[опции]
\n\n
"
printf
"Использование:
%s [опции]
\n\n
"
"
$0
"
printf
"Опции:
\n
"
printf
" --iso -i Удаляет iso файлы в /tmp/.private/USER/out
\n
"
exit
0
...
...
bin/gen-apt-conf
View file @
404165d5
...
...
@@ -3,13 +3,13 @@
NETWORK
=
false
# базовые функции
.
$(
dirname
$0
)
/common
# shellcheck disable=SC1091
.
"
$(
dirname
"
$0
"
)
/common"
OPTS
=
$(
getopt
-o
h,d:,r:
--long
help
,net,network,dir:,repos:
--
"
$@
"
)
if
[
$?
!=
0
]
;
then
OPTS
=
$(
getopt
-o
h,d:,r:
--long
help
,net,network,dir:,repos:
--
"
$@
"
)
||
{
print_error
"Ошибка обработки опций."
exit
1
fi
}
# Применение параметров
eval set
--
"
$OPTS
"
...
...
@@ -18,7 +18,7 @@ while true; do
case
"
$1
"
in
-h
|
--help
)
printf
"
\n
"
printf
"Использование:
$0
[опции]
\n\n
"
printf
"Использование:
%s [опции]
\n\n
"
"
$0
"
printf
"Опции:
\n
"
printf
" -h | --help Вывод этой справки
\n
"
printf
" -d | --dir Путь к tmp
\n
"
...
...
@@ -111,4 +111,4 @@ EOF
gen_sources
gen_config
echo
$APTCONF
echo
"
$APTCONF
"
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