mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[enh] Add ynh_package_update helper and call it in install_from_equivs
This commit is contained in:
parent
c8b4813440
commit
07bfae73a4
1 changed files with 10 additions and 0 deletions
|
@ -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 \
|
||||
|
|
Loading…
Add table
Reference in a new issue