Switch theme to Doks

This commit is contained in:
2021-01-31 00:54:37 -08:00
commit 98666f3a08
150 changed files with 24437 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
---
title: "Pak Docs"
draft: false
description: "Documentation for the Pak package manager wrapper"
menu:
docs:
parent: "docs"
---

View File

@@ -0,0 +1,42 @@
---
title: "Configuration"
draft: false
description: "Configuring pak"
---
{{< appveyor-ci project="pak" projectID="e4yacqd78gkte8a0" >}}
{{< minio-s3 project="pak" >}}
### Config file
Pak uses a custom config file at `/etc/pak.cfg`. For example, this is what the
apt config looks like:
```cfg
# Write the name of the package manager in all lowercase below
apt
# Write a comma separated list of commands from the manager below
install,remove,update,upgrade,search,download
# Write "yes" or "no" depending on whether you want to use root
yes
# Write command to use for root
sudo
# Write a comma separated list of shortcuts below
rm,inst
# Write a comma separated list of shortcut mappings from the manager below
remove,install
```
This file is read by pak to tell it what to do. The comments above each keyword
explain what it's for.
Here is a list of all the fields and their uses:
1. Command to invoke the package manager.
2. Comma-separated list of commands supported by the package manager.
3. Whether or not to invoke the root command.
4. Command to use for root invocation (`sudo`, `doas`, etc.)
5. Comma-separated list of shortcuts for pak to accept
6. Comma-separated list of shortcut mappings (what each shortcut sends to the
package manager). These do not necessarily need to be in the commands list.
Once you have made the config, just place it at `/etc/pak.cfg` and pak will
automatically use it.

View File

@@ -0,0 +1,91 @@
---
title: "Installation"
draft: false
description: "Installing pak"
---
{{< appveyor-ci project="pak" projectID="e4yacqd78gkte8a0" >}}
{{< minio-s3 project="pak" >}}
## Using precompiled binary
Pak uses continuous integration to compile. You can find the binary either by
clicking the CI badge above or by going to the gitlab repo using the button below and
navigating to the releases.
{{< button-gitlab color="OrangeRed" project="pak" text="Pak" >}}
## Using the AUR
If you are running an arch-based linux distro, you can use the Arch User Repository
to install pak. First, make sure the `yay` AUR helper is installed, then run the following:
```bash
yay -S pak
```
## Building from source
### Downloading
Pak is hosted on my Gitea instance. If that is down, it is also mirrored on Gitlab.
{{< button-gitea color="green" project="pak" text="Pak" >}}
{{< button-gitlab color="OrangeRed" project="pak" text="Pak" >}}
To download pak, you can either use the download button on Gitea or Gitlab, or
you can use the git CLI
To clone pak using the CLI, run one of the following commands:
```bash
git clone https://gitea.arsenm.dev/Arsen6331/pak
OR
git clone https://gitlab.com/moussaelianarsen/pak
```
### Building
Pak is written in Go. This means go must be installed on your computer. Most
linux distros call the package that provides it either `go` or `golang`.
Once go is installed, you can check that it runs by running
```bash
go version
```
To compile pak, run
```bash
make
```
Then, you will need to figure out which package manager you have. Here is a list
of package managers with ready to use configs:
- apt
- aptitude
- brew
- yay (with wrapper)
- pacman (with wrapper)
- zypper
- snap
If your package manager is not in the list, you can make a config for it. Go to
the Configuration page for more information.
### Installing
If your package manager is in the list, use one of these:
- apt: `sudo make aptinstall`
- aptitude: `sudo make aptitude`
- brew: `sudo make brewinstall`
- yay: `sudo make yayinstall`
- pacman: `sudo make pacinstall`
- zypper: `sudo make zyppinstall`
- snap: `sudo make snapinstall`
- custom: `sudo make installbinonly`
Once the command completes, unless you're using a custom config, pak should be ready
and you can run the following to make sure it works:
```bash
pak
```
Go to the Configuration page for instructions on making a custom config, you **must**
have a config for pak to function.

28
content/docs/pak/usage.md Normal file
View File

@@ -0,0 +1,28 @@
---
title: "Usage"
draft: false
description: "Using pak"
---
{{< appveyor-ci project="pak" projectID="e4yacqd78gkte8a0" >}}
{{< minio-s3 project="pak" >}}
Using pak is simple, just run `pak` and one of the commands from the config file.
Pak understands partial commands, so these commands will be identical:
```bash
pak in <package>
OR
pak inst <package>
OR
pak install <package>
```
The lack of `sudo` is intentional. Pak will not allow running from root by default
as it already invokes root internally. To bypass this, simply give pak the `-r` flag.
Using shortcuts in pak is just as simple as commands, just run `pak` and a shortcut,
like this:
```bash
pak rm <package>
```