mirror of
https://github.com/tailscale/tailscale.git
synced 2025-02-18 02:48:40 +00:00
cmd/mkpkg: add flags for debian scripts.
This commit is contained in:
parent
f473965ca1
commit
accf868130
@ -38,6 +38,9 @@ func main() {
|
||||
files := getopt.StringLong("files", 'F', "", "comma-separated list of files in src:dst form")
|
||||
configFiles := getopt.StringLong("configs", 'C', "", "like --files, but for files marked as user-editable config files")
|
||||
version := getopt.StringLong("version", 0, "0.0.0", "version of the package")
|
||||
postinst := getopt.StringLong("postinst", 0, "", "debian postinst script path")
|
||||
prerm := getopt.StringLong("prerm", 0, "", "debian prerm script path")
|
||||
postrm := getopt.StringLong("postrm", 0, "", "debian postrm script path")
|
||||
getopt.Parse()
|
||||
|
||||
filesMap, err := parseFiles(*files)
|
||||
@ -67,6 +70,11 @@ func main() {
|
||||
case "deb":
|
||||
info.Section = "net"
|
||||
info.Priority = "extra"
|
||||
info.Overridables.Scripts = nfpm.Scripts{
|
||||
PostInstall: *postinst,
|
||||
PreRemove: *prerm,
|
||||
PostRemove: *postrm,
|
||||
}
|
||||
case "rpm":
|
||||
info.Overridables.RPM.Group = "Network"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user