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
a0b1fb81
Commit
a0b1fb81
authored
Mar 10, 2017
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm sf: fix download for local path
parent
7f331f5f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
epm-sh-altlinux
bin/epm-sh-altlinux
+8
-5
No files found.
bin/epm-sh-altlinux
View file @
a0b1fb81
...
...
@@ -73,8 +73,10 @@ compress_file_inplace()
# result: will set FILE
download_alt_contents_index
()
{
local
URL
=
"
$1
"
local
TD
=
"
$2
"
local
OFILE
=
"
$TD
/
$(
basename
"
$1
"
)
"
local
OFILE
=
"
$TD
/
$(
basename
"
$URL
"
)
"
local
DONE
=
$(
echo
$OFILE
*)
# TODO: check if too old
if
[
-r
"
$DONE
"
]
;
then
...
...
@@ -83,11 +85,12 @@ download_alt_contents_index()
mkdir
-p
"
$TD
"
if
echo
"
$1
"
|
grep
-q
"/"
;
then
# TODO: separate
cp
-fv
"
$1
"
"
$OFILE
"
||
{
touch
$OFILE
.failed
;
return
1
;
}
if
echo
"
$URL
"
|
grep
-q
"^file:/"
;
then
URL
=
$(
echo
"
$URL
"
|
sed
-e
"s|^file:||"
)
[
-s
"
$URL
"
]
||
{
touch
$OFILE
.failed
;
return
1
;
}
ln
-s
"
$URL
"
"
$OFILE
"
||
{
touch
$OFILE
.failed
;
return
1
;
}
else
docmd eget
-O
"
$OFILE
"
"
$
1
"
||
{
touch
$OFILE
.failed
;
return
1
;
}
docmd eget
-O
"
$OFILE
"
"
$
URL
"
||
{
rm
-fv
$OFILE
;
touch
$OFILE
.failed
;
return
1
;
}
fi
compress_file_inplace
"
$OFILE
"
...
...
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