mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-24 22:50:39 +01:00
pkg.sh: Don't run sudo rpm -U if running as root already
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
c7b0f19364
commit
1cb1b90d7a
1 changed files with 3 additions and 1 deletions
|
|
@ -204,8 +204,10 @@ check_pkg_install()
|
||||||
shift
|
shift
|
||||||
[ ! -f "$1" ] && return 0
|
[ ! -f "$1" ] && return 0
|
||||||
}
|
}
|
||||||
|
local sudo
|
||||||
|
[ "$UID" = 0 ] || sudo=/usr/bin/sudo
|
||||||
echo "+ installing $1"
|
echo "+ installing $1"
|
||||||
sudo $RPM -U $1 || {
|
$sudo $RPM -U $1 || {
|
||||||
echo "failed to install $1"
|
echo "failed to install $1"
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue