com.netflix.gradle.plugins.deb.InstallLineGenerator.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gradle-ospackage-plugin Show documentation
Show all versions of gradle-ospackage-plugin Show documentation
Provides a task similar to Tar and Zip for constructing RPM and DEB package files.
package com.netflix.gradle.plugins.deb
class InstallLineGenerator {
String generate(DebCopyAction.InstallDir dir) {
StringBuilder sb = new StringBuilder("install ")
if(dir.user) {
sb.append("-o ${dir.user} ")
}
if(dir.group) {
sb.append("-g ${dir.group} ")
}
sb.append("-d ${dir.name}")
sb.toString()
}
}