summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAustin English <austinenglish@gmail.com>2016-02-12 02:30:17 -0600
committerAustin English <austinenglish@gmail.com>2016-02-12 02:36:58 -0600
commitc9776df5029a2cc4c04165f940d64f63ffa584f6 (patch)
tree944bbb2f550c2abb109453fd638b57a697fb3feb
parent0395915ee893d8cf45579dd5287dc2c70100ad10 (diff)
config/chroot_local-hooks/59-libdvd-pkg: move fake libdvd-pkg package creation to a subshell
-rwxr-xr-xconfig/chroot_local-hooks/59-libdvd-pkg22
1 files changed, 12 insertions, 10 deletions
diff --git a/config/chroot_local-hooks/59-libdvd-pkg b/config/chroot_local-hooks/59-libdvd-pkg
index 3aac24d..585112b 100755
--- a/config/chroot_local-hooks/59-libdvd-pkg
+++ b/config/chroot_local-hooks/59-libdvd-pkg
@@ -8,13 +8,14 @@ apt-get --yes install libdvd-pkg
dpkg-reconfigure libdvd-pkg
# Create and install fake libdvd-pkg package
-local tmp
-tmp="$(mktemp -d)"
-apt-get install --yes equivs
+(
+ local tmp
+ tmp="$(mktemp -d)"
+ apt-get install --yes equivs
-LIBDVD_PKG_VERSION=$(dpkg-query -s libdvd-pkg | grep Version | cut -d ' ' -f2 )
+ LIBDVD_PKG_VERSION=$(dpkg-query -s libdvd-pkg | grep Version | cut -d ' ' -f2 )
-cat > "${tmp}/libdvd-pkg-${LIBDVD_PKG_VERSION}.control" << EOF
+ cat > "${tmp}/libdvd-pkg-${LIBDVD_PKG_VERSION}.control" << EOF
Section: multimedia
Priority: optional
Homepage: https://tails.boum.org/
@@ -28,8 +29,9 @@ Description: (Fake) libdvd-pkg package
Provide placeholder to keep libdvdcss2 happy.
EOF
-cd "${tmp}"
-equivs-build "${tmp}/libdvd-pkg-${LIBDVD_PKG_VERSION}.control"
-dpkg -i "${tmp}/libdvd-pkg-${LIBDVD_PKG_VERSION}_1.0_all.deb"
-cd -
-rm -R "${tmp}"
+ cd "${tmp}"
+ equivs-build "${tmp}/libdvd-pkg-${LIBDVD_PKG_VERSION}.control"
+ dpkg -i "${tmp}/libdvd-pkg-${LIBDVD_PKG_VERSION}_1.0_all.deb"
+ cd -
+ rm -R "${tmp}"
+)