summaryrefslogtreecommitdiff
path: root/packages/jvmtop/build.gradle
blob: ad250a9ab11c6ca4fc091913ba1c9bea8c140a17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
version '0.8.0'

final download = makeDownloadTask(
    url: "https://github.com/patric-r/jvmtop/releases/download/0.8.0/jvmtop-${project.version}.tar.gz",
    sha256: 'f9de8159240b400a51b196520b4c4f0ddbcaa8e587fab1f0a59be8a00dc128c4')

download.acceptAnyCertificate true

task unpack(type: Copy) {
    from tarTree(download.dest)
    into file("${buildDir}/unpacked/dist")
    eachFile { FileCopyDetails fcd ->
        fcd.path = fcd.path.substring(path.indexOf('/')+1)
    }
}
unpack.dependsOn(download)

ospackage {
  from(unpack.outputs.files) {
    into "/opt/${project.name}"
    eachFile { FileCopyDetails fcd ->
      if (fcd.name == "jvmtop.sh") {
        fcd.mode = 0555
      }
    }
  }
}

activator.bin['jvmtop'] = "/opt/${project.name}/jvmtop.sh"