[enh] Add ynh_package_update helper and call it in install_from_equivs

This commit is contained in:
Jérôme Lebleu 2016-01-17 02:52:24 +01:00
parent c8b4813440
commit 07bfae73a4

View file

@ -24,6 +24,13 @@ ynh_package_version() {
fi
}
# Update package index files
#
# usage: ynh_package_update
ynh_package_update() {
sudo apt-get -y -qq update
}
# Install package(s)
#
# usage: ynh_package_install name [name [...]]
@ -51,6 +58,9 @@ ynh_package_install_from_equivs() {
&& echo "Invalid control file" && exit 1
controlfile=$(readlink -f "$1")
# update packages cache
ynh_package_update
# build and install the package
TMPDIR=$(ynh_mkdir_tmp)
(cd $TMPDIR \