Compare commits
2 Commits
a35f05a13e
...
8269c4bcc1
Author | SHA1 | Date | |
---|---|---|---|
8269c4bcc1 | |||
47eeacf1a5 |
4
.gitm.toml
Normal file
4
.gitm.toml
Normal file
@ -0,0 +1,4 @@
|
||||
[repos]
|
||||
origin = "ssh://git@192.168.100.62:2222/Arsen6331/pak.git"
|
||||
gitlab = "git@gitlab.com:moussaelianarsen/pak.git"
|
||||
github = "git@github.com:Arsen6331/pak.git"
|
39
AdvMakefile
Normal file
39
AdvMakefile
Normal file
@ -0,0 +1,39 @@
|
||||
defaultName = "pak"
|
||||
defaultTarget = "build"
|
||||
availableManagers = [
|
||||
"apk",
|
||||
"apt",
|
||||
"aptitude",
|
||||
"brew",
|
||||
"dnf",
|
||||
"yum",
|
||||
"npm",
|
||||
"pacman",
|
||||
"yay",
|
||||
"pip",
|
||||
"snap",
|
||||
"zypper"
|
||||
]
|
||||
|
||||
|
||||
def pak_build():
|
||||
if lookPath("go") == -1:
|
||||
log("Go must be installed to compile pak", level="fatal")
|
||||
execute("go build")
|
||||
|
||||
|
||||
def pak_install():
|
||||
mappings = {"PKGMANAGER": userChoice("Choose package manager", availableManagers)}
|
||||
expandFile("pak.toml", mappings)
|
||||
execute("""
|
||||
install -Dm755 pak $DESTDIR/usr/bin/pak
|
||||
install -Dm644 pak.toml $DESTDIR/etc/pak.toml
|
||||
""")
|
||||
|
||||
|
||||
def pak_install_noninteractive():
|
||||
expandFile("pak.toml", {"PKGMANAGER": getEnv("PAK_CFG_MGR")})
|
||||
execute("""
|
||||
install -Dm755 pak $DESTDIR/usr/bin/pak
|
||||
install -Dm644 pak.toml $DESTDIR/etc/pak.toml
|
||||
""")
|
4
Makefile
4
Makefile
@ -6,8 +6,8 @@ all: main.go
|
||||
install: PAK_CFG_MGR ?= apt
|
||||
install: pak.toml pak
|
||||
install -Dm755 pak $(DESTDIR)/usr/bin/pak
|
||||
sed 's/activeManager = ""/activeManager = "$(PAK_CFG_MGR)"/' pak.toml > pak-new.toml
|
||||
install -Dm644 pak-new.toml $(DESTDIR)/etc/pak.toml
|
||||
sed -i 's/activeManager = "\$PKGMANAGER"/activeManager = "$(PAK_CFG_MGR)"/' pak.toml
|
||||
install -Dm644 pak.toml $(DESTDIR)/etc/pak.toml
|
||||
|
||||
installbinonly: pak
|
||||
install -Dm755 pak $(DESTDIR)/usr/bin/pak
|
||||
|
20
go.sum
20
go.sum
@ -1,20 +0,0 @@
|
||||
github.com/alessio/shellescape v1.4.1 h1:V7yhSDDn8LP4lc4jS8pFkt0zCnzVJlG5JXy9BVKJUX0=
|
||||
github.com/alessio/shellescape v1.4.1/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30=
|
||||
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/pelletier/go-toml v1.8.2-0.20201124181426-2e01f733df54 h1:U7n5zyrdmyUTvXR7DRuSRrdFBkjcIPeCjSG2GScQSL8=
|
||||
github.com/pelletier/go-toml v1.8.2-0.20201124181426-2e01f733df54/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc=
|
||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ=
|
||||
github.com/rs/zerolog v1.20.0 h1:38k9hgtUBdxFwE34yS8rTHmHBa4eN16E4DJlv177LNs=
|
||||
github.com/rs/zerolog v1.20.0/go.mod h1:IzD0RJ65iWH0w97OQQebJEvTZYvsCUm9WVLWBQrJRjo=
|
||||
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
|
||||
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/tools v0.0.0-20190828213141-aed303cbaa74/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
Loading…
Reference in New Issue
Block a user