-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update documentation and completion for subcommand * Drawback: No support for aliases in argparse 2.7 * Fix #36: Fix Search * Improve search with basic flags, more may follow * Simplify src_hash methods
- Loading branch information
1 parent
f811374
commit 2e141aa
Showing
11 changed files
with
555 additions
and
481 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,119 +1,143 @@ | ||
# Demo | ||
|
||
- This demo should take about 5 minutes. | ||
- Nothing done in this demo will harm your system. | ||
- Pakit will put all files under `/tmp/pakit`. | ||
- You should be able to simply copy & paste the following commands into a terminal. | ||
These commands are based on my Ubuntu machine. | ||
- Nothing done in this demo should harm your system. | ||
- Pakit will install all files under `/tmp/pakit`. | ||
- Some configs will be written to`~/.pakit.yml` and `~/.pakit/` | ||
- Copy and paste these commands in order into a terminal. | ||
|
||
## Before Starting | ||
|
||
Please see the installation steps & notes in `README.md`. | ||
You may also find it useful to consule the man page if anything requires clarification. | ||
Please see the installation steps in the [README.md](https://github.com/starcraftman/pakit/tree/sub_com#install-pakit). | ||
See the end of the demo for extra information. | ||
|
||
## Run Commands | ||
|
||
Run these commands in order to demonstrate Pakit. | ||
|
||
**Write User Config** | ||
|
||
Writes the default configuration to a file in home, default: `$HOME/.pakit.yml` | ||
This configuration can be edited by a user to alter Pakit's behaviour. | ||
The default configuration is written to: `~/.pakit.yml` | ||
See the man page for a breakdown of the file. | ||
|
||
```bash | ||
pakit --create-conf | ||
pakit create-conf | ||
cat ~/.pakit.yml | ||
``` | ||
|
||
**Install Packages** | ||
**Install Programs** | ||
|
||
To start we will install two programs, `ag` and `tmux`. | ||
|
||
Install two packages, the fast grep like program `ag` and the screen replacement | ||
`tmux` to `pakit.paths.prefix` and link to `pakit.paths.link`. May take a while. | ||
During the command pakit will: | ||
- Download source to `pakit.paths.source` | ||
- Build the source in that dir, then install to `pakit.paths.prefix` | ||
- Link the installed files to `pakit.paths.links` | ||
|
||
```bash | ||
pakit --install ag tmux | ||
pakit install ag tmux | ||
``` | ||
|
||
**Check Programs** | ||
|
||
Verify that installed programs work. | ||
|
||
1. The `which` command should print out location of binary. | ||
2. The `ag` command will search your hidden shell files for `export` commands. | ||
**List Installed Programs** | ||
|
||
```bash | ||
which ag | ||
ag --hidden --depth 2 --shell export | ||
pakit list | ||
``` | ||
|
||
**Remove Package** | ||
**Check Programs** | ||
|
||
Now to verify the installations... | ||
|
||
Simple remove, no trace will be left. Only removes tmux. | ||
1. The `which` command should print out the linked location of `tmux`. | ||
1. The `ag` command will print matching lines from the config. | ||
|
||
```bash | ||
pakit --remove tmux | ||
which tmux | ||
ag tmp ~/.pakit.yml | ||
``` | ||
|
||
**More Information On Recipe** | ||
**Remove Program** | ||
|
||
Prints out information including description, requirements, repositories to fetch | ||
source code and any additional notes. | ||
Now let us remove `tmux` and confirm it is gone. | ||
|
||
```bash | ||
pakit --display ag vim | ||
pakit remove tmux | ||
which tmux | ||
``` | ||
|
||
**List Available Recipes** | ||
**More Information On A Recipe** | ||
|
||
Prints out any recipe Pakit can install. | ||
Print out information about a recipe, including configured repo and requirements. | ||
|
||
```bash | ||
pakit --available | ||
pakit display ag vim | ||
``` | ||
|
||
**List Installed Programs** | ||
**List Available Recipes** | ||
|
||
Prints out recipes that have been installed onto the system. | ||
Prints out recipes Pakit can install. | ||
Default recipes can be viewed inside `~/.pakit/base_recipes` | ||
|
||
```bash | ||
pakit --list | ||
pakit available | ||
``` | ||
|
||
**Edit Config** | ||
|
||
Now to demonstrate configuration options. | ||
Let us change the repository `ag` builds from `stable` to `unstable`. | ||
This will force an update since we have specified a different revision to build from. | ||
Now to demonstrate configuration options I will change the repo `ag` uses. | ||
By default it downloads and builds a tagged release from the `stable` repo. | ||
Changing it to `unstable` will force it to rebuild from the latest commit. | ||
|
||
Edit your `$HOME/.pakit.yml` file and add the following line at the end. Save and exit. | ||
Edit `~/.pakit.yml` and add the following section at the end. Save and exit. | ||
|
||
```yaml | ||
ag: | ||
repo: unstable | ||
``` | ||
|
||
This newly added `ag` section, overrides the `defaults` section only for the `ag` recipe. | ||
**Update Recipes**: | ||
|
||
**Update Packages**: | ||
Recipes will be updated when... | ||
- The configured repo changes. | ||
- The recipe is tracking a branch with a new commit. | ||
- The recipe is tracking a tag and it has changed. | ||
- The recipe is built from an archive and the archive URI has changed. | ||
|
||
Updates all recipes on the system. | ||
If there are new commits on the branch, a tag has been changed or | ||
the URI/archive has changed it should force a rebuild of the new source. | ||
At this time, `ag` will be rebuilt from the latest commit to its repository. | ||
We just changed the repo for `ag` so it will be rebuilt. | ||
|
||
```bash | ||
pakit --update | ||
pakit update | ||
``` | ||
|
||
**Verify Update Changed Ag** | ||
|
||
This command should list a different hash than before. You may have to scroll up to confirm. | ||
The hash listed will differ from the one printed before. | ||
|
||
```bash | ||
pakit --list | ||
pakit list | ||
``` | ||
|
||
**Search Recipes** | ||
|
||
Simple search support is available to find recipes. | ||
By default the search is case insensitive and matches against recipe names or descriptions. | ||
|
||
```bash | ||
pakit search vim | ||
``` | ||
|
||
## Demo Clean Up (Optional) | ||
|
||
To remove all files pakit made. | ||
|
||
```bash | ||
rm -rf /tmp/pakit ~/.pakit ~/.pakit.yml | ||
``` | ||
|
||
Then just uninstall pakit. | ||
|
||
## More Information | ||
|
||
- pakit --help | ||
- man pakit | ||
- pydoc pakit | ||
More information is available is available from ... | ||
|
||
- `pakit --help` | ||
- `man pakit` | ||
- man pakit_recipes | ||
- `pydoc pakit` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.