Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eepm
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
etersoft
eepm
Commits
5aba0531
Commit
5aba0531
authored
Mar 10, 2017
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm sf: more error checking
parent
7a495280
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
27 deletions
+30
-27
epm-filelist
bin/epm-filelist
+1
-1
epm-search_file
bin/epm-search_file
+0
-17
epm-sh-altlinux
bin/epm-sh-altlinux
+29
-9
No files found.
bin/epm-filelist
View file @
5aba0531
...
...
@@ -37,7 +37,7 @@ __alt_local_content_filelist()
{
[
-n
"
$USETTY
"
]
&&
info
"Search in
$CI
for
$1
..."
grep
-h
--
".*
$1
$"
$CI
|
sed
-e
"s|
\(
.*
\)\t\(
.*
\)
|
\1
|g"
__local_ercat
$CI
|
grep
-h
--
".*
$1
$"
|
sed
-e
"s|
\(
.*
\)\t\(
.*
\)
|
\1
|g"
}
|
$OUTCMD
}
...
...
bin/epm-search_file
View file @
5aba0531
...
...
@@ -17,23 +17,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
__local_ercat
()
{
local
i
for
i
in
$*
;
do
case
"
$i
"
in
*
.xz
)
a
=
xzcat
$i
;;
*
.lz4
)
a
=
lz4cat
$i
;;
*
)
cat
$i
;;
esac
done
}
__alt_local_content_search
()
{
...
...
bin/epm-sh-altlinux
View file @
5aba0531
...
...
@@ -25,12 +25,35 @@ get_local_alt_mirror_path()
{
local
DN1
=
$(
dirname
"
$1
"
)
local
DN2
=
$(
dirname
$DN1
)
local
DN3
=
$(
dirname
$DN2
)
local
BN0
=
$(
basename
"
$1
"
)
# arch
local
BN1
=
$(
basename
$DN1
)
# branch/Sisyphus
local
BN2
=
$(
basename
$DN2
)
local
BN2
=
$(
basename
$DN2
)
# p8/ALTLinux
local
BN3
=
$(
basename
$DN3
)
# ALTLinux/
[
"
$BN1
"
=
"branch"
]
&&
echo
"/tmp/eepm/
$BN2
/
$BN1
/
$BN0
"
||
echo
"/tmp/eepm/
$BN1
/
$BN0
"
[
"
$BN1
"
=
"branch"
]
&&
echo
"/tmp/eepm/
$BN3
/
$BN2
/
$BN1
/
$BN0
"
||
echo
"/tmp/eepm/
$BN2
/
$BN1
/
$BN0
"
}
__local_ercat
()
{
local
i
for
i
in
$*
;
do
case
"
$i
"
in
*
.xz
)
a
=
xzcat
$i
;;
*
.lz4
)
a
=
lz4cat
$i
;;
*
.failed
)
# just ignore
;;
*
)
cat
$i
;;
esac
done
}
# args: url/path target_file
...
...
@@ -39,7 +62,7 @@ download_alt_contents_index()
{
local
TD
=
"
$2
"
local
OFILE
=
"
$TD
/
$(
basename
"
$1
"
)
"
local
DONE
=
"
$TD
/done.
$(
basename
"
$1
"
)
"
local
DONE
=
$(
echo
$OFILE
*)
# TODO: check if too old
if
[
-r
"
$DONE
"
]
;
then
return
...
...
@@ -49,22 +72,19 @@ download_alt_contents_index()
if
echo
"
$1
"
|
grep
-q
"/"
;
then
# TODO: separate
cp
-fv
"
$1
"
"
$OFILE
"
||
return
cp
-fv
"
$1
"
"
$OFILE
"
||
{
touch
$OFILE
.failed
;
return
1
;
}
else
docmd eget
-O
"
$OFILE
"
"
$1
"
||
return
docmd eget
-O
"
$OFILE
"
"
$1
"
||
{
touch
$OFILE
.failed
;
return
1
;
}
fi
# plain file by default
echo
""
>
$DONE
# try compress
if
epm assure lz4 </dev/null
;
then
docmd lz4
--rm
"
$OFILE
"
"
$OFILE
.lz4"
||
return
echo
"lz4"
>
$DONE
else
epm assure xz </dev/null
||
return
docmd xz
"
$ofile
"
||
return
echo
"xz"
>
$DONE
fi
return
0
}
get_local_alt_contents_index
()
...
...
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