@ -6,6 +6,7 @@
package main
import (
"flag"
"fmt"
"log"
"os"
@ -14,7 +15,6 @@ import (
"github.com/goreleaser/nfpm"
_ "github.com/goreleaser/nfpm/deb"
_ "github.com/goreleaser/nfpm/rpm"
"github.com/pborman/getopt"
)
// parseFiles parses a comma-separated list of colon-separated pairs
@ -44,21 +44,21 @@ func parseEmptyDirs(s string) []string {
}
func main ( ) {
out := getopt . String Long ( "out" , 'o' , "" , "output file to write" )
name := getopt . String Long ( "name" , 'n' , "tailscale" , "package name" )
description := getopt . String Long ( "description" , 'd' , "The easiest, most secure, cross platform way to use WireGuard + oauth2 + 2FA/SSO" , "package description" )
goarch := getopt . String Long ( "arch" , 'a' , "amd64" , "GOARCH this package is for" )
pkgType := getopt . String Long ( "type" , 't' , "deb" , "type of package to build (deb or rpm)" )
files := getopt . String Long ( "files" , 'F' , "" , "comma-separated list of files in src:dst form" )
configFiles := getopt . String Long ( "configs" , 'C' , "" , "like --files, but for files marked as user-editable config files" )
emptyDirs := getopt . String Long ( "emptydirs" , 'E' , "" , "comma-separated list of empty directories" )
version := getopt . String Long ( "version" , 0 , "0.0.0" , "version of the package" )
postinst := getopt . String Long ( "postinst" , 0 , "" , "debian postinst script path" )
prerm := getopt . String Long ( "prerm" , 0 , "" , "debian prerm script path" )
postrm := getopt . String Long ( "postrm" , 0 , "" , "debian postrm script path" )
replaces := getopt . String Long ( "replaces" , 0 , "" , "package which this package replaces, if any" )
depends := getopt . String Long ( "depends" , 0 , "" , "comma-separated list of packages this package depends on" )
getopt . Parse ( )
out := fla g. String ( "out" , "" , "output file to write" )
name := fla g. String ( "name" , "tailscale" , "package name" )
description := fla g. String ( "description" , "The easiest, most secure, cross platform way to use WireGuard + oauth2 + 2FA/SSO" , "package description" )
goarch := fla g. String ( "arch" , "amd64" , "GOARCH this package is for" )
pkgType := fla g. String ( "type" , "deb" , "type of package to build (deb or rpm)" )
files := fla g. String ( "files" , "" , "comma-separated list of files in src:dst form" )
configFiles := fla g. String ( "configs" , "" , "like --files, but for files marked as user-editable config files" )
emptyDirs := fla g. String ( "emptydirs" , "" , "comma-separated list of empty directories" )
version := fla g. String ( "version" , "0.0.0" , "version of the package" )
postinst := fla g. String ( "postinst" , "" , "debian postinst script path" )
prerm := fla g. String ( "prerm" , "" , "debian prerm script path" )
postrm := fla g. String ( "postrm" , "" , "debian postrm script path" )
replaces := fla g. String ( "replaces" , "" , "package which this package replaces, if any" )
depends := fla g. String ( "depends" , "" , "comma-separated list of packages this package depends on" )
fla g. Parse ( )
filesMap , err := parseFiles ( * files )
if err != nil {