mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 12:03:31 +01:00
projects-dir.mk: Support non-interactive install-prereq-build
Support non-interactive install-prereq-build Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
f5ab24d344
commit
64e7338bed
2 changed files with 23 additions and 4 deletions
|
|
@ -80,7 +80,7 @@ echo-prereq-build:
|
|||
@python $(MOD_SCRIPT_DIR)/projects.py $(PROJECTS_PY_EXTRA_ARGS) required-pkg $(BUILD_PROJECTS)
|
||||
|
||||
install-prereq-build:
|
||||
make --no-print-directory echo-prereq-build 2>/dev/null | xargs -r $(PKG_MANAGER_SH) install
|
||||
make --no-print-directory echo-prereq-build 2>/dev/null | xargs -r $(PKG_MANAGER_SH) install -y
|
||||
|
||||
echo-prereq-release:
|
||||
@make --no-print-directory pull.done >/dev/null 2>&1
|
||||
|
|
|
|||
|
|
@ -26,17 +26,36 @@ usage()
|
|||
run()
|
||||
{
|
||||
log "Running ==== $@"
|
||||
eval sudo "$@"
|
||||
eval "$@"
|
||||
}
|
||||
|
||||
cmd_install()
|
||||
{
|
||||
local env opts global_opts
|
||||
local non_interactive
|
||||
|
||||
set -- `getopt 'y' $*`
|
||||
while [ "$1" != -- ] ; do
|
||||
case "$1" in
|
||||
-y)
|
||||
non_interactive=1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
shift
|
||||
|
||||
case $ID in
|
||||
opensuse|suse)
|
||||
eval run zypper in "$@"
|
||||
[ "$non_interactive" = 1 ] && global_opts="$global_opts --non-interactive"
|
||||
eval run sudo $env zypper $global_opts install "$@"
|
||||
;;
|
||||
debian)
|
||||
eval run apt-get install "$@"
|
||||
[ "$non_interactive" = 1 ] && {
|
||||
global_opts="$global_opts -yq"
|
||||
env="$env DEBIAN_FRONTEND=noninteractive"
|
||||
}
|
||||
eval run sudo $env apt-get $global_opts install "$@"
|
||||
;;
|
||||
*)
|
||||
fatal "Tried to install to unsupported platform \"$ID\""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue