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
ddd7984c
Commit
ddd7984c
authored
Nov 24, 2016
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm-checkpkg: add support for checking package by url
parent
c2b4006a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
3 deletions
+32
-3
epm-checkpkg
bin/epm-checkpkg
+19
-3
epm-download
bin/epm-download
+13
-0
No files found.
bin/epm-checkpkg
View file @
ddd7984c
#!/bin/sh
#!/bin/sh
#
#
# Copyright (C) 2009, 2012, 2013, 2014 Etersoft
# Copyright (C) 2009, 2012, 2013, 2014
, 2016
Etersoft
# Copyright (C) 2009, 2012, 2013, 2014 Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2009, 2012, 2013, 2014
, 2016
Vitaly Lipatov <lav@etersoft.ru>
#
#
# This program is free software: you can redistribute it and/or modify
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# it under the terms of the GNU Affero General Public License as published by
...
@@ -75,14 +75,30 @@ esac
...
@@ -75,14 +75,30 @@ esac
epm_checkpkg
()
epm_checkpkg
()
{
{
if
[
-n
"
$pkg_names
"
]
;
then
if
[
-n
"
$pkg_names
"
]
;
then
# TODO: если есть / или расширение, это отсутствующий файл
info
"Suggest
$pkg_names
are name(s) of installed packages"
info
"Suggest
$pkg_names
are name(s) of installed packages"
__epm_check_installed_pkg
$pkg_names
__epm_check_installed_pkg
$pkg_names
return
return
fi
fi
# if possible, it will put pkg_urls into pkg_files or pkg_names
if
[
-n
"
$pkg_urls
"
]
;
then
load_helper epm-download
__handle_pkg_urls_to_checking
fi
[
-n
"
$pkg_files
"
]
||
fatal
"Checkpkg: missing file or package name(s)"
[
-n
"
$pkg_files
"
]
||
fatal
"Checkpkg: missing file or package name(s)"
local
RETVAL
=
0
local
pkg
local
pkg
for
pkg
in
$pkg_files
;
do
for
pkg
in
$pkg_files
;
do
check_pkg_integrity
$pkg
||
fatal
"Broken package
$pkg
"
check_pkg_integrity
$pkg
||
RETVAL
=
1
done
done
# TODO: reinvent
[
-n
"
$to_remove_pkg_files
"
]
&&
rm
-fv
$to_remove_pkg_files
#fatal "Broken package $pkg"
return
$RETVAL
}
}
bin/epm-download
View file @
ddd7984c
...
@@ -79,6 +79,19 @@ __handle_pkg_urls_to_install()
...
@@ -79,6 +79,19 @@ __handle_pkg_urls_to_install()
pkg_urls
=
pkg_urls
=
}
}
__handle_pkg_urls_to_checking
()
{
#[ -n "$pkg_urls" ] || return
# TODO: do it correctly
to_remove_pkg_files
=
# use workaround with eget: download and put in pkg_files
__download_pkg_urls
pkg_urls
=
}
#__clean_downloaded_pkg_files()
#__clean_downloaded_pkg_files()
#{
#{
# [ -z "$to_remove_pkg_files" ] && return
# [ -z "$to_remove_pkg_files" ] && return
...
...
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