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
363e8bbd
Commit
363e8bbd
authored
Sep 06, 2013
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpmgp: add support for check ALT gear repos
parent
651aa25a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
3 deletions
+29
-3
rpmgp
bin/rpmgp
+26
-3
gits
etc/repos/gits
+3
-0
No files found.
bin/rpmgp
View file @
363e8bbd
...
@@ -19,12 +19,19 @@ load_systems_list()
...
@@ -19,12 +19,19 @@ load_systems_list()
local
line
local
line
while
read
line
;
do
while
read
line
;
do
# skip comments
# skip comments
echo
$line
|
grep
"^#"
>
/dev/null
&&
continue
echo
$line
|
grep
-q
"^#"
&&
continue
SYSNAME[
$IDX
]=
${
line
/ *.*/
}
SYSNAME[
$IDX
]=
${
line
/ *.*/
}
#FTP[$IDX]=${line/.* \+/}
#FTP[$IDX]=${line/.* \+/}
SYSURL[
$IDX
]=
$(
echo
$line
|
sed
-e
"s|.*
\+
||g"
)
SYSURL[
$IDX
]=
$(
echo
$line
|
sed
-e
"s|.*
\+
||g"
)
IDX
=
$((
$IDX
+
1
))
IDX
=
$((
$IDX
+
1
))
done
<
$ETERBUILDETC
/repos/srpms
done
<
$ETERBUILDETC
/repos/srpms
while
read
name url
;
do
echo
$name
|
grep
-q
"^#"
&&
continue
SYSNAME[
$IDX
]=
"git
$name
"
SYSURL[
$IDX
]=
$url
IDX
=
$((
$IDX
+
1
))
done
<
$ETERBUILDETC
/repos/gits
}
}
list_systems
()
list_systems
()
...
@@ -34,7 +41,7 @@ list_systems()
...
@@ -34,7 +41,7 @@ list_systems()
printf
"[%-17s] %s
\n
"
${
SYSNAME
[
$i
]
}
${
SYSURL
[
$i
]
}
printf
"[%-17s] %s
\n
"
${
SYSNAME
[
$i
]
}
${
SYSURL
[
$i
]
}
done
done
echo
echo
echo
"You can add s
ystem to /etc/eterbuild/repos/srpm
s"
echo
"You can add s
rc.rpm repo to /etc/eterbuild/repos/srpms or git url to /etc/eterbuild/repos/git
s"
}
}
html_filter
()
html_filter
()
...
@@ -47,6 +54,17 @@ list_filter()
...
@@ -47,6 +54,17 @@ list_filter()
sed
-e
"s|.src.rpm
$|
|g"
sed
-e
"s|.src.rpm
$|
|g"
}
}
get_git_list
()
{
local
name
=
$1
local
url
=
$2
local
list
=
$3
for
i
in
$(
curl
$url
|
grep
folder |
sed
-e
"s|.*HREF=
\"
||g"
|
sed
-e
"s|
\"
.*||g"
)
;
do
curl
$url
/
$i
|
grep
'class="link"'
|
sed
-e
"s|.*href=
\"
||g"
|
sed
-e
"s|
\"
.*||g"
done
>
$list
}
# Using: git_list idx [force]
# Using: git_list idx [force]
# set LIST variable to list file
# set LIST variable to list file
get_list
()
get_list
()
...
@@ -55,16 +73,21 @@ get_list()
...
@@ -55,16 +73,21 @@ get_list()
local
URL
=
${
SYSURL
[
$1
]
}
local
URL
=
${
SYSURL
[
$1
]
}
local
FORCE
=
$2
local
FORCE
=
$2
local
SYS
=
${
SYSNAME
[
$1
]
}
local
SYS
=
${
SYSNAME
[
$1
]
}
local
CURL
=
curl
CURL
=
curl
which
$CURL
2>/dev/null
>
/dev/null
||
fatal
"curl command needed for download"
which
$CURL
2>/dev/null
>
/dev/null
||
fatal
"curl command needed for download"
mkdir
-p
$OURTMPDIR
/etersoft-build-utils/
mkdir
-p
$OURTMPDIR
/etersoft-build-utils/
LIST
=
$OURTMPDIR
/etersoft-build-utils/rpmgpall-
$SYS
LIST
=
$OURTMPDIR
/etersoft-build-utils/rpmgpall-
$SYS
if
[
!
-f
"
$LIST
"
]
||
[
"
$FORCE
"
=
"force"
]
;
then
if
[
!
-f
"
$LIST
"
]
||
[
"
$FORCE
"
=
"force"
]
;
then
if
echo
$SYS
|
grep
-q
^git
;
then
get_git_list
$SYS
$URL
$LIST
return
fi
echo
"Get list for
$SYS
from
$URL
"
echo
"Get list for
$SYS
from
$URL
"
#curl -l $URL/ >$LIST
#curl -l $URL/ >$LIST
# suitable for ftp and http lists
# suitable for ftp and http lists
$CURL
-l
$URL
/ |
tee
$LIST
.tmp | html_filter
>
$LIST
$CURL
-l
$URL
/ |
tee
$LIST
.tmp | html_filter
>
$LIST
# check if there is letter subdirs (Fedora)
for
i
in
$(
cat
$LIST
.tmp
)
;
do
for
i
in
$(
cat
$LIST
.tmp
)
;
do
echo
$i
|
grep
-q
rpm
&&
break
echo
$i
|
grep
-q
rpm
&&
break
[
-n
"
$(
echo
$i
|
cut
-c2-
)
"
]
&&
continue
[
-n
"
$(
echo
$i
|
cut
-c2-
)
"
]
&&
continue
...
...
etc/repos/gits
0 → 100644
View file @
363e8bbd
# all known git repositories (for rpmgp command)
altgears http://git.altlinux.org/gears/
altsrpms http://git.altlinux.org/srpms/
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