Exherbo cave wrapper
Find a file
Denis Knauf 3782f838eb Logic moved from truckle to cave.
truckle commands to cave added: `cave do`, `cave retry`, `cave upgrade`
You do not need truckle upgrade, now sudo cave upgrade works, too.
These commands do not depend on truckle, it works fine with cave-only.

Environment variables added via `/etc/profile.d/cave.sh`.
At the moment only resume-file-depended variables
(TRUCKLE_RESUME_FILE, CAVE_RESUME_OPTIONS, CAVE_RESOLVE_OPTIONS, ...)
If you use cave, the resume-file will be used automaticaly.
You do not need truckle anymore to have auto-resume-files.
But sudo will remove these from env...

Sudoers-config for cave added via `/etc/sudoers.d/cave`.
sudo will keep the same variables like defined in `/etc/profile.d/cave.sh`.
I do not know, but i think it can be a security hole.
But never allow users to use cave as root!
So, now you can use sudo, too.

These combinations of new cave-related changes will allow this:

  sudo cave upgrade
  sudo cave do
  # something went wrong?
  sudo cave retry

Only pagered it is easier with truckle:

  sudo cave -cy upgrade | less -R
  # vs.
  truckle upgrade
2013-07-10 13:37:23 +02:00
cave_commands Logic moved from truckle to cave. 2013-07-10 13:37:23 +02:00
configs Logic moved from truckle to cave. 2013-07-10 13:37:23 +02:00
.gitignore colored truckle help. .gitignore vim temp files. Makefile added. 2013-02-06 13:50:11 +01:00
AUTHORS AUTHORS added 2013-02-16 16:30:31 +01:00
LICENSE LICENSE added 2013-02-16 16:12:48 +01:00
Makefile Logic moved from truckle to cave. 2013-07-10 13:37:23 +02:00
README.md -- 2013-02-16 15:47:40 +01:00
README.pre.md GetoptLong: ARGV must be used, no @argv possible. :/ 2013-02-16 15:39:57 +01:00
truckle Logic moved from truckle to cave. 2013-07-10 13:37:23 +02:00

truckle and cave

cave is very powerful package mangler. If you do not know it, you will not know exherbo, too. So you should try exherbo or you never will need truckle.

truckle will do thing, which cave will never do, for example uses a pager automaticaly for longer output. Useful if you want to install many packages. And will use sudo if needed.

Why did not cave provide these things? It's unclean and it should be clean. While cave is a very powerful package mangler, truckle is a smart tool for often used functions of cave

Usage

truckle *PREARGS Command *ARGS

Arguments

Precede the command, it's possible to set some arguments. These Arguments really must precede the command.

  • -C|--list-commands will list all possible commands and exit.
  • -h|--help will print this help and exit.
  • -n|--dummy will print the shellcode, which will be executed, if not --dummy.
  • -s|--sudo on|off|auto will use (or not) sudo if you are not root.
  • -c|--color|--colour on|off|auto will control the colorfull output of cave.
  • -L|--log-level LOGLEVEL will control the log-level of cave.
  • -p|--pager PAGER will change the pager to display.

Instead of on|off you can use 0|true or 1|false too. Default is everytime auto.

Environment

  • DUMMY=1 will print the shellcode, which will be executed, like --dummy.
  • NOSUDO=1 will prevent of using sudo, if you are not root, like --sudo off.
  • PAGER=more will change the pager to more, instead of less, like --pager more.

Commands

Most commands are like by cave.

  • search is pagered.
  • show is pagered.
  • resolve is pagered and resumable. Do not use -x! Use resume.
  • install is resumable and like cave resolve -x.
  • upgrade is pagered and resumable and like cave resolve -c world. Do not use -x! Use resume.
  • remove is pagered, resumable and like cave uninstall. Do not use -x! Use resume.
  • uninstall is resumable and like cave uninstall -x.
  • fix-linkage is pagered and resumable.
  • do and resume are resumable and will resume or execute the last command.

Resumable

You do not need to set a resume-file. truckle will determine it automaticaly. First, you can give a first argument for tagging. Tag must be numerical!

truckle 321 resolve netcat6
truckle 321 do

If you do not give a tag, truckle will use the actual terminal-device-number. If it isn't possible to determine terminal, the parent-pid will be used.

Like cave but different

Some commands will be displayed by a pager, so you can scroll up and down like

truckle resolve WHAT    # cave -cy resolve WHAT | less -R
truckle remove WHAT     # cave -cy uninstall WHAT | less -R

Some commands are not displayed by a pager, but will execute:

truckle install WHAT    # cave -cy resolve -x WHAT
truckle uninstall WHAT  # cave -cy uninstall -x WHAT

«do» and «resume» are special, to execute the last command:

truckle resume # | do   # cave resume
trdo # | tresume        # shortcuts