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
Nurlan
eepm
Commits
e1219c4a
Commit
e1219c4a
authored
Aug 26, 2015
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check_updated_repo: use $SUDO for check if updated
parent
d9aa9f4d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
epm-check_updated_repo
bin/epm-check_updated_repo
+3
-3
No files found.
bin/epm-check_updated_repo
View file @
e1219c4a
...
...
@@ -36,13 +36,13 @@ __is_repo_info_uptodate()
{
case
$PMTYPE
in
apt-
*
)
if
[
-r
/var/lib/apt/lists
]
;
then
if
$SUDO
[
-r
/var/lib/apt/lists
]
;
then
local
LOCKFILE
=
/var/lib/apt/lists/lock
# FIXME: only if root permissions, now skip for user
test
-r
$LOCKFILE
||
return
$SUDO
test
-r
$LOCKFILE
||
return
# if repo older than 1 day, return false
# find print string if file is obsoleted
test
-z
"
$(
find
$LOCKFILE
-mtime
+1
)
"
||
return
test
-z
"
$(
$SUDO
find
$LOCKFILE
-mtime
+1
)
"
||
return
fi
;;
*
)
...
...
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