Unpack webclient into dist subdir

The old webclient tarballs had content in a "dist" subdirectory, but
newer ones do not. So as to avoid webroot contamination as well as
to make sure we copy the correct new content into place, unpack the
tarballs into an empty "dist" subdirectory of the download staging
directory.

Change-Id: I15d1e00c9a0aa752b21b6eeedb29bcd89dc03935
This commit is contained in:
Jeremy Stanley 2018-05-16 22:11:03 +00:00
parent 00b5e658b9
commit 71cc8f97a4
1 changed files with 15 additions and 3 deletions

View File

@ -217,13 +217,25 @@ class storyboard::application (
onlyif => "curl -I ${webclient_url} -z ./${webclient_filename} | grep '200 OK'",
}
# Create/clean the storyboard-webclient unpack directory
file { "${src_root_webclient}/dist":
ensure => directory,
recurse => true,
purge => true,
force => true,
require => File[$src_root_webclient],
}
# Unpack storyboard-webclient
exec { 'unpack-webclient':
command => "tar -xzf ./${webclient_filename}",
command => "tar -xzf ../${webclient_filename}",
path => '/bin:/usr/bin',
refreshonly => true,
cwd => $src_root_webclient,
require => Exec['get-webclient'],
cwd => "${src_root_webclient}/dist",
require => [
File["${src_root_webclient}/dist"],
Exec['get-webclient'],
],
subscribe => Exec['get-webclient'],
}