mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Restore use of subshell
This commit is contained in:
parent
0989e27d58
commit
b062c014b0
1 changed files with 4 additions and 4 deletions
|
@ -89,19 +89,19 @@ ynh_package_install_from_equivs () {
|
|||
|
||||
# Build and install the package
|
||||
TMPDIR=$(ynh_mkdir_tmp)
|
||||
cp "$controlfile" "${TMPDIR}/control" && pushd "$TMPDIR" # pushd is like a cd, but it stores the previous directory
|
||||
# Note that the cd executes into a sub shell
|
||||
# Create a fake deb package with equivs-build and the given control file
|
||||
# Install the fake package without its dependencies with dpkg
|
||||
# Install missing dependencies with ynh_package_install
|
||||
equivs-build ./control 1>/dev/null \
|
||||
(cp "$controlfile" "${TMPDIR}/control" && cd "$TMPDIR" \
|
||||
&& equivs-build ./control 1>/dev/null \
|
||||
&& sudo dpkg --force-depends \
|
||||
-i "./${pkgname}_${pkgversion}_all.deb" 2>&1 \
|
||||
&& ynh_package_install -f
|
||||
&& ynh_package_install -f)
|
||||
[[ -n "$TMPDIR" ]] && rm -rf $TMPDIR # Remove the temp dir.
|
||||
|
||||
# check if the package is actually installed
|
||||
ynh_package_is_installed "$pkgname"
|
||||
popd # Like a cd on the directory stored by pushd
|
||||
}
|
||||
|
||||
# Install dependencies with a equivs control file
|
||||
|
|
Loading…
Add table
Reference in a new issue