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
b954c382
Unverified
Commit
b954c382
authored
Oct 26, 2024
by
Кирилл Уницаев
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move common functions to bin/common
parent
0858350d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
26 deletions
+33
-26
build-distro
bin/build-distro
+3
-20
cleartmp
bin/cleartmp
+9
-6
common
bin/common
+21
-0
No files found.
bin/build-distro
View file @
b954c382
...
...
@@ -19,25 +19,8 @@ if [ -z "$PROFILESDIR" ]; then
PROFILESDIR
=
"/home/
$USER
/Projects/ximper-builder/mkimage-profiles"
fi
print_error
()
{
printf
"
\0
33[1;31m%s
\0
33[0m
\n
"
"
$1
"
}
print_green
()
{
printf
"
\0
33[1;32m%s
\0
33[0m
\n
"
"
$1
"
}
print_yellow
()
{
printf
"
\0
33[1;33m%s
\0
33[0m
\n
"
"
$1
"
}
print_blue
()
{
printf
"
\0
33[1;34m%s
\0
33[0m
\n
"
"
$1
"
}
print_red
()
{
printf
"
\0
33[1;31m%s
\0
33[0m
\n
"
"
$1
"
}
# базовые функции
.
$(
dirname
$0
)
/common
print_paths
()
{
echo
"____________________"
...
...
@@ -155,7 +138,7 @@ eval set -- "$OPTS"
while
true
;
do
case
"
$1
"
in
-h
|
--help
)
printf
"Использование:
./distrobuild.sh
[опции] [версия дистрибутива]
\n\n
"
printf
"Использование:
$0
[опции] [версия дистрибутива]
\n\n
"
printf
"Опции:
\n
"
printf
" --nvidia Собирает дистрибутив с драйверами nvidia
\n
"
printf
" --debug Включает режим отладки
\n
"
...
...
bin/cleartmp
View file @
b954c382
#!/bin/bash
echo
"Cleaning...."
# базовые функции
.
$(
dirname
$0
)
/common
print_blue
"Cleaning...."
[
-d
"
$PROFILESDIR
/build"
]
&&
\
pushd
$PROFILESDIR
\
&&
make clean
\
&&
rm
-rf
$TMP
/mkimage-profiles.build.
*
\
&&
rm
-rf
./build
&&
popd
\
&&
echo
"cleaning mkimage-profiles is DONE"
&&
print_green
"cleaning mkimage-profiles is DONE"
[
-d
$TMP
/hasher-sisyphus-64
]
&&
rm
-rf
$TMP
/hasher-sisyphus-64/
\
&&
echo
"cleaning hasher-sisyphus is DONE"
&&
print_green
"cleaning hasher-sisyphus is DONE"
rmiso
()
{
rm
-rf
/tmp/.private/
"
$USER
"
/out/
*
...
...
@@ -19,18 +22,18 @@ rmiso() {
while
[
-n
"
$1
"
]
;
do
case
"
$1
"
in
-h
|
--help
)
printf
"Использование:
./bin/cleartmp
[опции]
\n\n
"
printf
"Использование:
$0
[опции]
\n\n
"
printf
"Опции:
\n
"
printf
" --iso -i Удаляет iso файлы в /tmp/.private/USER/out
\n
"
exit
0
;;
--iso
|
-i
)
rmiso
echo
"iso файлы удалены"
print_green
"iso файлы удалены"
shift
;;
esac
shift
done
echo
"DONE"
print_green
"DONE"
bin/common
0 → 100755
View file @
b954c382
#!/bin/bash
print_error
()
{
printf
"
\0
33[1;31m%s
\0
33[0m
\n
"
"
$1
"
}
print_green
()
{
printf
"
\0
33[1;32m%s
\0
33[0m
\n
"
"
$1
"
}
print_yellow
()
{
printf
"
\0
33[1;33m%s
\0
33[0m
\n
"
"
$1
"
}
print_blue
()
{
printf
"
\0
33[1;34m%s
\0
33[0m
\n
"
"
$1
"
}
print_red
()
{
printf
"
\0
33[1;31m%s
\0
33[0m
\n
"
"
$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