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
1f32c2f5
Commit
1f32c2f5
authored
Nov 11, 2017
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add support for external eget
parent
1410ac4b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
9 deletions
+30
-9
epm-sh-functions
bin/epm-sh-functions
+17
-1
pack_in_onefile.sh
pack_in_onefile.sh
+13
-8
No files found.
bin/epm-sh-functions
View file @
1f32c2f5
...
...
@@ -367,10 +367,26 @@ assure_exists()
__epm_assure
"
$1
"
$package
$3
||
fatal
"Can't assure in '
$1
' command from
$package$textpackage
package"
}
# will replaced within disabled_eget in packaged version
eget
()
{
# use internal eget only if exists
if
[
-s
$SHAREDIR
/tools_eget
]
;
then
$SHAREDIR
/tools_eget
"
$@
"
return
fi
assure_exists eget
# run external command, not the function
EGET
=
$(
which eget
)
||
fatal
"Missed command eget from installed package eget"
$EGET
"
$@
"
}
# will replaced within eget() in packed version
onefile_eget
()
{
assure_exists wget
$SHAREDIR
/
tools_eget
"
$@
"
internal_
tools_eget
"
$@
"
}
# TODO: improve and drop!
...
...
pack_in_onefile.sh
View file @
1f32c2f5
...
...
@@ -2,8 +2,8 @@
#
# Run for create one-file-scripts
#
# Copyright (C) 2012, 2016 Etersoft
# Copyright (C) 2012, 2016 Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2012, 2016
, 2017
Etersoft
# Copyright (C) 2012, 2016
, 2017
Vitaly Lipatov <lav@etersoft.ru>
#
# 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
...
...
@@ -24,14 +24,17 @@ incorporate_subfile()
{
cat
<<
EOF
>>
$OUTPUT
internal_
$1
()
################# incorporate
$1
#################
internal_
$(
basename
$1
)
()
{
EOF
cat
bin/
$1
|
grep
-v
"^#!/bin/sh"
|
sed
-e
"s| exit
$|
return|g"
>>
$OUTPUT
cat
$1
|
grep
-v
"^#!/bin/sh"
|
sed
-e
"s| exit
$|
return|g"
>>
$OUTPUT
cat
<<
EOF
>>
$OUTPUT
}
################# end of incorporated
$1
#################
EOF
}
...
...
@@ -43,7 +46,8 @@ get_version()
filter_out
()
{
grep
-v
"^[ ]*load_helper "
|
\
sed
-e
's|$SHAREDIR/tools_eget|internal_tools_eget|g'
|
\
sed
-e
's|^eget()|disabled_eget()|g'
|
\
sed
-e
's|^onefile_eget()|eget()|g'
|
\
sed
-e
's|$SHAREDIR/tools_json|internal_tools_json|g'
|
\
sed
-e
's|DISTRVENDOR=$PROGDIR/distr_info|DISTRVENDOR=internal_distr_info|g'
|
\
sed
-e
"s|@VERSION@|
$(
get_version
)
|g"
...
...
@@ -63,9 +67,10 @@ for i in bin/epm-sh-functions $(ls -1 bin/$PACKCOMMAND-* | grep -v epm-sh-functi
cat
$i
|
grep
-v
"^#"
done
| filter_out
>>
$OUTPUT
incorporate_subfile distr_info
incorporate_subfile tools_eget
incorporate_subfile tools_json
incorporate_subfile bin/distr_info
#incorporate_subfile /usr/bin/eget
incorporate_subfile bin/tools_eget
incorporate_subfile bin/tools_json
awk
'BEGIN{desk=0}{if(desk>0) {print} ; if(/^load_helper epm-sh-functions/){desk++}}'
<bin/
$PACKCOMMAND
| filter_out
>>
$OUTPUT
chmod
0755
$OUTPUT
...
...
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