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
3267a45d
Verified
Commit
3267a45d
authored
Feb 15, 2025
by
Кирилл Уницаев
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added deploy script (WIP)
parent
6cd32e1a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
70 additions
and
6 deletions
+70
-6
build-distro
bin/build-distro
+1
-5
common
bin/common
+1
-0
deploy
bin/deploy
+68
-0
gen-apt-conf
bin/gen-apt-conf
+0
-1
No files found.
bin/build-distro
View file @
3267a45d
...
...
@@ -55,7 +55,6 @@ print_build_info() {
check
()
{
if
[
"
$MD5
"
==
"true"
]
&&
[
"
$DEPLOY_DIR
"
!=
"ftp"
]
;
then
print_error
"--md5 можно использовать только при --deploy=ftp"
exit
1
fi
}
...
...
@@ -131,7 +130,7 @@ makebuild() {
make
DISTRO_VERSION
=
"
$VER
"
APTCONF
=
"
$APTCONF
"
"ximper-
${
desktop_env
}${
iso_suffix
}
.iso"
# Генерация имени файла
DFILENAME
=
"ximper-
${
desktop_env
}${
iso_suffix
}
-
${
VER
}
-
$(
date
+
"%Y_%m_%d_%H%M"
)
"
DFILENAME
=
"ximper-
${
desktop_env
}${
iso_suffix
}
-
${
VER
}
-
$(
date
+
"%Y_%m_%d_%H
_
%M"
)
"
# Добавление хэша коммита или примечания о временном коммите
if
[
"
$VER
"
==
"devel"
]
;
then
...
...
@@ -174,7 +173,6 @@ deploy() {
OPTS
=
$(
getopt
-o
h
--long
help
,nvidia,debug,clean,all,deploy::,md5,gnome,hyprland,net,network,repos:
--
"
$@
"
)
||
{
print_error
"Ошибка обработки опций."
exit
1
}
# Применение параметров
...
...
@@ -276,7 +274,6 @@ while true; do
continue
fi
print_error
"Неверная опция:
$1
"
exit
1
;;
esac
done
...
...
@@ -301,7 +298,6 @@ if [ -n "$1" ]; then
shift
else
print_error
"Не указана версия дистрибутива."
exit
1
fi
check
...
...
bin/common
View file @
3267a45d
...
...
@@ -2,6 +2,7 @@
print_error
()
{
printf
"
\0
33[1;31m%s
\0
33[0m
\n
"
"
$1
"
exit
1
}
print_green
()
{
...
...
bin/deploy
0 → 100755
View file @
3267a45d
#!/bin/bash
BUILDERDIR
=
$(
realpath
"
$(
dirname
"
$0
"
)
"
/..
)
SOURCE_DIR
=
"/var/ftp/pvt/ISO/testing/template/iso"
IS_DEVEL
=
false
# базовые функции
# shellcheck disable=SC1091
.
"
$BUILDERDIR
"
/bin/common
if
[[
"
$1
"
==
"--devel"
]]
;
then
IS_DEVEL
=
true
VERSION
=
"devel"
shift
elif
[
-z
"
$1
"
]
;
then
print_error
"Не указана версия образов. Использование: ./deploy.sh <версия> [--devel]"
else
VERSION
=
"
$1
"
shift
fi
if
$IS_DEVEL
;
then
TARGET_DIR
=
"/var/ftp/pub/Etersoft/XimperLinux/Devel/ISO"
else
TARGET_DIR
=
"/var/ftp/pub/Etersoft/XimperLinux/Current/ISO"
fi
copied_files
=()
for
iso_file
in
"
$SOURCE_DIR
"
/ximper-
*
"
$VERSION
"
*
-
*
.iso
;
do
if
[
!
-f
"
$iso_file
"
]
;
then
continue
fi
new_filename
=
$(
basename
"
$iso_file
"
)
if
!
$IS_DEVEL
;
then
# Для Current версии убираем часть .rc{rc-ver}-{date}
new_filename
=
$(
echo
"
$new_filename
"
|
sed
-E
's/\.rc[0-9]+-[0-9_]+//'
)
fi
target_file
=
"
$TARGET_DIR
/
$new_filename
"
echo
"
$iso_file
"
echo
"
$target_file
"
#cp "$iso_file" "$target_file" || print_error "Не удалось скопировать файл: $iso_file -> $target_file"
copied_files+
=(
"
$target_file
"
)
done
if
[
${#
copied_files
[@]
}
-eq
0
]
;
then
print_error
"Не найдено ни одного образа для версии
$VERSION
"
fi
exit
0
for
file
in
"
${
copied_files
[@]
}
"
;
do
"
$BUILDERDIR
"
/bin/gen_md5
"
$file
"
done
if
!
$IS_DEVEL
;
then
pushd
"
$TARGET_DIR
"
>
/dev/null
||
exit
"
$BUILDERDIR
"
/bin/torrents_create
"
${
copied_files
[@]
}
"
||
print_error
"Ошибка при создании торрентов"
"
$BUILDERDIR
"
/bin/torrents_deploy
popd
>
/dev/null
||
exit
fi
print_green
"Деплой успешно завершён!"
bin/gen-apt-conf
View file @
3267a45d
...
...
@@ -8,7 +8,6 @@ NETWORK=false
OPTS
=
$(
getopt
-o
h,d:,r:
--long
help
,net,network,dir:,repos:
--
"
$@
"
)
||
{
print_error
"Ошибка обработки опций."
exit
1
}
# Применение параметров
...
...
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