blob: a74417e350bf9bdd499014c50529b5dc7cf35a8a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# Downloads the given $version of sevenzip from 7-zip.org and installs to the specified $path.
# If a different 7-zip version is already installed there, it is uninstalled first.
class sevenzip::windows(
$version = '9.20',
$version_flags = '',
$path = 'C:\utils\sevenzip'
) {
# Version without dots, for example '920'
$version_no_dots = regsubst($version, '\.', '', "G")
# installer file URL
$url = "http://downloads.sourceforge.net/sevenzip/7z${version_no_dots}.exe"
windows::exe_package { "sevenzip":
url => $url,
version => $version,
version_flags => $version_flags,
path => $path,
type => 'nsis',
binary => "$path\\7z.exe"
}
}
|