Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix: correct helper setup docs for bash and zsh #593

Merged
merged 3 commits into from
Jan 4, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 44 additions & 10 deletions docs/packaging/prepare-for-packaging.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
summary: Quick guide on getting your system set up for packaging on Solus
sidebar_position: 1
---

# Prepare for packaging

## Switch to the Unstable repository
Expand Down Expand Up @@ -120,9 +119,17 @@

```bash
mkdir -p ~/.bashrc.d
chmod 700 ~/.bashrc.d
ln -s ~/solus-packages/common/Scripts/helpers.sh ~/.bashrc.d/solus-monorepo-helpers.sh
source ~/.bashrc
```

:::note

By default, the system will load all files in `~/.bashrc.d` through code in `.bashrc`

:::

### fish

```bash
Expand All @@ -132,25 +139,52 @@

### zsh

:::note

If you already have a customized `.zshrc` or config for `zsh`, you'll need to adapt these commands or edit your config by hand

:::

```bash
mkdir -p ~/.zshrc.d
chmod 700 ~/.zshrc.d
printf "\nfpath=(~/.zshrc.d \$fpath)" >> ~/.zshrc
source ~/.zshrc
ln -s ~/solus-packages/common/Scripts/helpers.zsh ~/.zshrc.d/solus-monorepo-helpers.zsh
source ~/.zshrc
```

This is what you need in your `.zshrc` (or another file loaded by `zsh`)

:::note

You may have more than what is shown here if you have customized things

:::

```bash
fpath=($HOME/.zshrc.d $fpath)
autoload -U $HOME/.zshrc.d/*
```

Check warning on line 167 in docs/packaging/prepare-for-packaging.md

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (autoload)

Verify that `$fpath` contains the needed directory with:

```bash
echo $fpath | grep .zshrc.d
```

---

You should now have the following available from your shell:

| Function | Description | Usage |
| ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------- |
| **cpesearch** | Search for CPE Names for packages. For use when writing the [`monitoring.yml`](/docs/packaging/monitoring.yml.md) file for a package | `cpesearch search-term` |
| **goroot** | When in the Solus packages repository, change directory to the root directory. | `goroot` |
| **gotopkg** | Change directory to any Solus package. You can type part of the package name then double press `Tab` to get autocompletion for this function. | `gotopkg firefox` |
| **gotosoluspkgs** | Change directory to the Solus packages repository from anywhere on the filesystem. | `gotosoluspkgs` |
| **whatprovides** | Find out what package provides a library by reading the `abi_libs` files. | `whatprovides libfoobar.so.1` |
| **whatuses** | Find out what packages use a library by reading the `abi_used_libs` files. | `whatuses libfoobar.so.1` |

| Function | Description | Usage |
| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- |
| **cpesearch** | Search for CPE Names for packages. For use when writing the[`monitoring.yml`](/docs/packaging/monitoring.yml.md) file for a package | `cpesearch search-term` |
| **goroot** | When in the Solus packages repository, change directory to the root directory. | `goroot` |
| **gotopkg** | Change directory to any Solus package. You can type part of the package name then double press`Tab` to get autocompletion for this function. | `gotopkg firefox` |
| **gotosoluspkgs** | Change directory to the Solus packages repository from anywhere on the filesystem. | `gotosoluspkgs` |
| **whatprovides** | Find out what package provides a library by reading the`abi_libs` files. | `whatprovides libfoobar.so.1` |
| **whatuses** | Find out what packages use a library by reading the`abi_used_libs` files. | `whatuses libfoobar.so.1` |

## Building packages

Expand Down
Loading