Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-build-utils
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
korinf
etersoft-build-utils
Commits
ae5ce5cb
Commit
ae5ce5cb
authored
Sep 24, 2010
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add some checking and fix target
parent
05ccdab7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
4 deletions
+21
-4
create_repo_from_list.sh
tools/create_repo_from_list.sh
+21
-4
No files found.
tools/create_repo_from_list.sh
View file @
ae5ce5cb
...
...
@@ -12,14 +12,20 @@
#load_mod rpm
ORIGREPO
=
/var/ftp/pub/ALTLinux/5.0
DESTREPO
=
/var/ftp/pub/Etersoft/LINUX@Etersoft/
branch/builder50
DESTREPO
=
/var/ftp/pub/Etersoft/LINUX@Etersoft/
5.0/asu
RPMSEXT
=
base
ARCHLIST
=
"noarch i586 x86_64"
# FIXME: no support for list arch
ARCHLIST
=
"i586 noarch"
for
i
in
$ARCHLIST
;
do
mkdir
-p
$DESTREPO
/
$i
/RPMS.
$RPMSEXT
done
if
[
"
$1
"
=
"-h"
]
||
[
"
$1
"
=
"--help"
]
;
then
echo
"create new repo in
$DESTREPO
based on packages installed in the current system"
exit
fi
# Get pkg list
if
[
-n
"
$1
"
]
;
then
PKGLIST
=
$(
cat
"
$1
"
)
...
...
@@ -36,9 +42,20 @@ for i in $PKGLIST ; do
REALFILE
=
$ORIGREPO
/
$i
/RPMS.classic/
$PKGNAME
.
$i
.rpm
test
-e
"
$REALFILE
"
&&
{
PKGARCH
=
$i
;
break
;
}
done
# Если не нашли с данной версией, ищем без версии
if
false
&&
[
-z
"
$PKGARCH
"
]
;
then
for
i
in
$ARCHLIST
;
do
REALFILE
=
$ORIGREPO
/
$i
/RPMS.classic/
$i
.
$i
.rpm
test
-e
"
$REALFILE
"
&&
{
PKGARCH
=
$i
;
break
;
}
done
fi
#echo "$PKGNAME, real package: $REALFILE"
test
-e
"
$REALFILE
"
||
{
echo
"ERROR:
$REALFILE
for
$PKGNAME
is missed"
>
&2
;
continue
;
}
ln
$REALFILE
$DESTREPO
/
$PKGARCH
/RPMS.
$RPMSEXT
/
$(
basename
$REALFILE
)
test
-e
"
$REALFILE
"
||
{
echo
"ERROR:
$PKGNAME
is missed"
>
&2
;
continue
;
}
DESTFILE
=
$DESTREPO
/
$PKGARCH
/RPMS.
$RPMSEXT
/
$(
basename
$REALFILE
)
test
-e
"
$DESTFILE
"
&&
continue
ln
"
$REALFILE
"
"
$DESTFILE
"
done
for
i
in
$ARCHLIST
;
do
...
...
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