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
2284bce2
Commit
2284bce2
authored
Jun 19, 2013
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
epm-install: fix Slackware install with sudocmd_foreach
parent
658c5f05
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
7 deletions
+19
-7
epm-install
bin/epm-install
+5
-6
epm-sh-functions
bin/epm-sh-functions
+14
-1
No files found.
bin/epm-install
View file @
2284bce2
...
@@ -100,9 +100,8 @@ epm_install_names()
...
@@ -100,9 +100,8 @@ epm_install_names()
return
;;
return
;;
slackpkg
)
slackpkg
)
separate_installed
$@
separate_installed
$@
# TODO: use upgrade if package is already installed
[
-n
"
$pkg_noninstalled
"
]
&&
sudocmd_foreach
"/usr/sbin/slackpkg install"
$pkg_noninstalled
[
-n
"
$pkg_noninstalled
"
]
&&
sudocmd /usr/sbin/slackpkg
install
$pkg_noninstalled
[
-n
"
$pkg_installed
"
]
&&
sudocmd_foreach
"/usr/sbin/slackpkg upgrade"
$pkg_installed
[
-n
"
$pkg_installed
"
]
&&
sudocmd /usr/sbin/slackpkg upgrade
$pkg_installed
return
;;
return
;;
homebrew
)
homebrew
)
separate_installed
$@
separate_installed
$@
...
@@ -169,9 +168,9 @@ epm_ni_install_names()
...
@@ -169,9 +168,9 @@ epm_ni_install_names()
return
;;
return
;;
slackpkg
)
slackpkg
)
separate_installed
$@
separate_installed
$@
# FIXME: broken status when use batch and default answ
rt
# FIXME: broken status when use batch and default answ
er
[
-n
"
$pkg_noninstalled
"
]
&&
sudocmd
/usr/sbin/slackpkg
-batch
=
on
-default_answer
=
yes install
$pkg_noninstalled
[
-n
"
$pkg_noninstalled
"
]
&&
sudocmd
_foreach
"/usr/sbin/slackpkg -batch=on -default_answer=yes install"
$pkg_noninstalled
[
-n
"
$pkg_installed
"
]
&&
sudocmd
/usr/sbin/slackpkg
-batch
=
on
-default_answer
=
yes
upgrade
$pkg_installed
[
-n
"
$pkg_installed
"
]
&&
sudocmd
_foreach
"/usr/sbin/slackpkg -batch=on -default_answer=yes upgrade"
$pkg_installed
return
;;
return
;;
*
)
*
)
fatal
"Have no suitable appropriate install command for
$PMTYPE
"
fatal
"Have no suitable appropriate install command for
$PMTYPE
"
...
...
bin/epm-sh-functions
View file @
2284bce2
...
@@ -96,7 +96,7 @@ docmd()
...
@@ -96,7 +96,7 @@ docmd()
"
$@
"
"
$@
"
}
}
#
Print command line and run command line
#
Run every arg with docmd
docmd_foreach
()
docmd_foreach
()
{
{
local
cmd
local
cmd
...
@@ -115,6 +115,19 @@ sudocmd()
...
@@ -115,6 +115,19 @@ sudocmd()
$SUDO
"
$@
"
$SUDO
"
$@
"
}
}
# Run every arg with sudocmd
sudocmd_foreach
()
{
local
cmd
cmd
=
"
$1
"
#showcmd "$@"
shift
for
pkg
in
"
$@
"
;
do
sudocmd
$cmd
$pkg
done
}
filter_strip_spaces
()
filter_strip_spaces
()
{
{
# possible use just
# possible use just
...
...
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