Fix package installation.

This commit is contained in:
David Tomaschik
2018-01-25 00:24:33 +00:00
parent a2acbeb8b5
commit 53f7bc9fe3

View File

@@ -205,7 +205,7 @@ function install_pkg_set {
local pkg_file=${BASEDIR}/${1} local pkg_file=${BASEDIR}/${1}
local pkg_list="" local pkg_list=""
if [[ ! -f ${pkg_file} ]] ; then return 0 ; fi if [[ ! -f ${pkg_file} ]] ; then return 0 ; fi
cat ${pkg_file} | while read line ; do while read line ; do
if [[ ${line:0:1} == '#' ]] ; then if [[ ${line:0:1} == '#' ]] ; then
continue continue
fi fi
@@ -217,8 +217,11 @@ function install_pkg_set {
else else
echo "Warning: package ${line} not found." >&2 echo "Warning: package ${line} not found." >&2
fi fi
done done < ${pkg_file}
run_as_root apt-get install -qqy ${pkg_list} if [ -n "${pkg_list}" ] ; then
verbose "Installing ${pkg_list}"
run_as_root apt-get install -qqy ${pkg_list}
fi
} }
function install_apt_pkgs { function install_apt_pkgs {
@@ -339,7 +342,11 @@ case $OPERATION in
install_main install_main
;; ;;
package*) package*)
install_pkg_set packages.${2} if [ ${2:-default} != default ] ; then
install_pkg_set packages.${2}
else
install_pkg_set packages
fi
;; ;;
pwndbg) pwndbg)
install_pwndbg install_pwndbg