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
ec0c3c0f
Commit
ec0c3c0f
authored
Sep 24, 2010
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add script from create repo from package list
parent
cb89bdad
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
0 deletions
+46
-0
create_repo_from_list.sh
tools/create_repo_from_list.sh
+46
-0
No files found.
tools/create_repo_from_list.sh
0 → 100755
View file @
ec0c3c0f
#!/bin/sh
# Etersoft (c) 2010
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain
# create repo from pkg list (from system or from list)
# need packages to be installed
# load common functions, compatible with local and installed script
.
`
dirname
$0
`
/../share/eterbuild/functions/common
load_mod rpm
ORIGREPO
=
/var/ftp/pub/ALTLinux/5.0
DESTREPO
=
/var/ftp/pub/Etersoft/LINUX@Etersoft/branch/builder50
RPMSEXT
=
base
ARCHLIST
=
"noarch i586 x86_64"
for
i
in
$ARCHLIST
;
do
mkdir
-p
$DESTREPO
/
$i
/RPMS.
$RPMSEXT
done
# Get pkg list
if
[
-n
"
$1
"
]
;
then
PKGLIST
=
$(
cat
"
$1
"
)
else
PKGLIST
=
$(
rpm
-qa
)
fi
for
i
in
$PKGLIST
;
do
#PKGNAME=$(querypackage $i "" "%{name}-%{version}-%{release}")
PKGNAME
=
$i
# TODO: do package try instead query info
PKGARCH
=
$(
querypackage
$i
""
"%{arch}"
)
REALFILE
=
$ORIGREPO
/
$PKGARCH
/RPMS.classic/
$PKGNAME
.
$PKGARCH
.rpm
#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
)
done
for
i
in
$ARCHLIST
;
do
mkdir
-p
$DESTREPO
/
$i
/base
echo
echo
"Genbasedir for
$DESTREPO
/
$i
"
genbasedir
-v
--topdir
=
$DESTREPO
$i
$RPMSEXT
done
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