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
af2ffcf2
Verified
Commit
af2ffcf2
authored
Nov 11, 2024
by
Кирилл Уницаев
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added network repo (--network)
parent
89c66c35
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
22 deletions
+43
-22
build-distro
bin/build-distro
+12
-5
gen-apt-conf
bin/gen-apt-conf
+31
-17
No files found.
bin/build-distro
View file @
af2ffcf2
...
...
@@ -6,6 +6,7 @@ NVIDIA=false
VM
=
false
CLEAN
=
false
DESKTOP_ENVS
=()
# Список выбранных рабочих окружений (например, gnome, hyprland)
NETWORK
=
false
# базовые функции
.
$(
dirname
$0
)
/common
...
...
@@ -135,7 +136,7 @@ makebuild() {
revert_temp_commit
}
OPTS
=
$(
getopt
-o
h
--long
help
,nvidia,debug,clean,all,vm,gnome,hyprland,repos:
--
"
$@
"
)
OPTS
=
$(
getopt
-o
h
--long
help
,nvidia,debug,clean,all,vm,gnome,hyprland,
net,network,
repos:
--
"
$@
"
)
if
[
$?
!=
0
]
;
then
print_error
"Ошибка обработки опций."
exit
1
...
...
@@ -158,7 +159,7 @@ while true; do
printf
" --gnome Собрать дистрибутив с GNOME (по умолчанию)
\n
"
printf
" --hyprland Собрать дистрибутив с Hyprland
\n
"
printf
" -h, --help Вывод этой справки
\n
"
shift
exit
0
;;
--nvidia
)
NVIDIA
=
true
...
...
@@ -189,6 +190,10 @@ while true; do
DESKTOP_ENVS+
=(
"hyprland"
)
shift
;;
--net
|
--network
)
NETWORK
=
"--network"
shift
;;
--repos
)
REPOS
=
"
$2
"
shift
...
...
@@ -212,9 +217,11 @@ if [ -z "REPOS" ]; then
REPOS
=
"sisyphus,ximper"
fi
buildertmp
=
$(
create_tmp
)
APTCONF
=
$($(
dirname
$0
)
/gen-apt-conf
-d
$buildertmp
-r
$REPOS
)
APTTMP
=
$(
dirname
$APTCONF
)
if
[
-z
"
$APTCONF
"
]
;
then
buildertmp
=
$(
create_tmp
)
APTCONF
=
$($(
dirname
$0
)
/gen-apt-conf
$NETWORK
-d
$buildertmp
-r
$REPOS
)
APTTMP
=
$(
dirname
$APTCONF
)
fi
# Установить GNOME по умолчанию, если ничего не выбрано
if
[
${#
DESKTOP_ENVS
[@]
}
-eq
0
]
;
then
...
...
bin/gen-apt-conf
View file @
af2ffcf2
#!/bin/bash
NETWORK
=
false
# базовые функции
.
$(
dirname
$0
)
/common
OPTS
=
$(
getopt
-o
h,d:,r:
--long
help
,dir:,repos:
--
"
$@
"
)
OPTS
=
$(
getopt
-o
h,d:,r:
--long
help
,
net,network,
dir:,repos:
--
"
$@
"
)
if
[
$?
!=
0
]
;
then
print_error
"Ошибка обработки опций."
exit
1
...
...
@@ -17,10 +19,15 @@ while true; do
-h
|
--help
)
printf
"Использование:
$0
[опции]
\n\n
"
printf
"Опции:
\n
"
printf
" -h, --help Вывод этой справки
\n
"
printf
" -d, --dir Путь к tmp
\n
"
printf
" -r, --repos Список репозиториев
\n
"
shift
printf
" -h, --help Вывод этой справки
\n
"
printf
" -d, --dir Путь к tmp
\n
"
printf
" -r, --repos Список репозиториев
\n
"
printf
" --net, --network Использовать сетевые репозитории
\n\n
"
printf
"Репозитории:
\n
"
printf
" sisyphus
\n
"
printf
" ximper
\n
"
printf
" hasher
\n
"
exit
0
;;
-d
|
--dir
)
buildertmp
=
"
$2
"
...
...
@@ -47,23 +54,30 @@ gen_sources() {
for
repo
in
$REPOS
;
do
case
"
$repo
"
in
*
sisyphus
*
)
base_url
=
"http://ftp.altlinux.org/pub/distributions/ALTLinux Sisyphus"
local_path
=
"file:/var/ftp/ pub/ALTLinux/Sisyphus"
if
[
"
$NETWORK
"
==
"true"
]
;
then
repo_path
=
"
$base_url
"
else
repo_path
=
"
$local_path
"
fi
cat
<<
EOF
>> "
$SOURCES
"
rpm [alt] file:/var/ftp/ pub/ALTLinux/Sisyphus/x86_64 classic
rpm [alt] file:/var/ftp/ pub/ALTLinux/Sisyphus/noarch classic
rpm [alt] file:/var/ftp/ pub/ALTLinux/Sisyphus/x86_64-i586 classic
EOF
;;
*
etersoft
*
)
cat
<<
EOF
>> "
$SOURCES
"
rpm file:/var/ftp/pub/Etersoft/WINE@Etersoft/9-testing/WINE x86_64/ALTLinux/Sisyphus main
rpm file:/var/ftp/pub/Etersoft/WINE@Etersoft/9-testing/WINE/x86_64 ALTLinux/Sisyphus/extra main
#rpm file:/var/ftp/pvt/Etersoft/WINE@Etersoft/9-testing/WINE-Network x86_64/ALTLinux/Sisyphus main
rpm [alt]
$repo_path
/x86_64 classic
rpm [alt]
$repo_path
/x86_64-i586 classic
rpm [alt]
$repo_path
/noarch classic
EOF
;;
*
ximper
*
)
base_url
=
"https://download.etersoft.ru/pub/download/ximper"
local_path
=
"file:/var/ftp/pub/download/ximper"
if
[
"
$NETWORK
"
==
"true"
]
;
then
repo_path
=
"
$base_url
"
else
repo_path
=
"
$local_path
"
fi
cat
<<
EOF
>> "
$SOURCES
"
rpm
file:/var/ftp/pub/download/ximper/ XimperLinuxRepository
/x86_64 addon
rpm
file:/var/ftp/pub/download/ximper/ XimperLinuxRepository
/noarch addon
rpm
$repo_path
/x86_64 addon
rpm
$repo_path
/noarch addon
EOF
;;
*
hasher
*
)
...
...
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