Commit Graph

26 Commits

Author SHA1 Message Date
Marco Vermeulen
dbcd29b080 Make gvm list in aeroplane mode zsh compliant :-P 2012-12-18 14:39:39 +00:00
Marco Vermeulen
e15924b871 Fix typo in gvm script header. 2012-12-18 11:01:45 +00:00
Marco Vermeulen
5f2240471a Some post aeroplane mode cleanup. 2012-12-17 17:30:08 +00:00
Marco Vermeulen
ad323dfcd1 Aeroplane mode introduced. 2012-12-17 16:57:49 +00:00
Marco Vermeulen
d3f6382665 Implement offline list versions. 2012-12-17 16:57:49 +00:00
Marco Vermeulen
23c5b9cefa Remove broadcast conditional, replace with Aeroplane mode message. 2012-12-17 16:57:49 +00:00
Marco Vermeulen
d977d89f91 Add comments to array hack in gvm script. For zsh compatibility. 2012-12-12 12:24:11 +00:00
Marco Vermeulen
d72b634947 Minor tweak to usage wording in main script. 2012-12-11 17:51:28 +00:00
Marco Vermeulen
7f7f976c24 More bug fixes to main gvm script. 2012-12-11 15:58:56 +00:00
Marco Vermeulen
3838ffa923 zsh compatibility issues resolved. 2012-12-11 13:31:27 +00:00
Marco Vermeulen
467074f8d1 Rename PLATFORM variable to GVM_PLATFORM. 2012-12-07 11:57:13 +00:00
Marco Vermeulen
969606ec23 Move gvm version and platform variables to init script. 2012-12-07 11:47:29 +00:00
Marco Vermeulen
79cf4e8153 Remove comments from main gvm script. 2012-12-07 11:41:14 +00:00
Marco Vermeulen
5e28fb9282 Reapply code formatting on scripts. 2012-12-07 11:36:26 +00:00
Peter Ledbrook
85f8e4879e Change path and name of gvm user config file.
This change also exposed a problem in the Cucumber tests with isolated mode,
so I have fixed the tests to handle separation of currently active version
and the default version of a candidate.
2012-12-07 10:31:48 +00:00
Peter Ledbrook
6cc537b104 Rename 'set-default' command to 'default'. 2012-12-07 10:31:47 +00:00
Peter Ledbrook
5952e17660 Fix cucumber tests for per-shell versions feature.
Since gvm is now a function that is sourced into the current shell, the old
Cucumber tests no longer work as they try to execute 'gvm' as a process. This
fix instead launches an external bash process for each scenario and pipes the
required commands to it.

A lot of the magic happens in the new BashEnv class which handles the piping
of commands and also managing the output correctly.

This is further work on issue #52.
2012-12-07 10:31:47 +00:00
Peter Ledbrook
ab94125c35 Add initial support for per-shell versions: issue #52
In order to make version changes only apply to the current shell, I had to make
the `gvm-init.sh` script source the `gvm` one. This meant replacing all `exit`
calls in the latter with `return`s and changing the name of the functions by
prefixing them with `__gvmtool_` (to avoid the functions appearing in bash
auto-completion by accident).

Note that this feature is not enabled by default. The user must create a
~/.gvm/gvmconfig file and add 'isolated_mode=1' to it in order to enable the
feature.

To help with some of the internals, `gvm-init.sh` now exports the `GVM_DIR`
variable if it hasn't already been set by the user. This makes it available to
`gvm` and any plugin scripts that get executed in sub-shells.

`gvm-init.sh` also sources any scripts in `$GVM_DIR/ext` whose name begins
with `sourced-`, allowing users to extend the system with extra functionality
implemented via bash functions. They are required to name their functions with
`__gvmtool_<command>`. Plugins can also be implemented as straight
`gvm-<command>.sh` scripts, but these manually need to source the `gvm` script
if they want access to its internal functions, such as `__gvmtool_help`.

In this 'isolated mode', users need some way of setting the default version of
candidates for new shells. So I have also added a new 'set-default' command
that updates the 'current' symlink to the specified candidate version.
2012-12-07 10:28:18 +00:00
Marco Vermeulen
7781b9a020 Add Apache 2.0 license to scripts. Remove appendix from main license file. 2012-12-05 13:55:30 +00:00
Marco Vermeulen
11050c9f20 Bash script code formatting, improvements and bug fixes. 2012-12-05 13:15:03 +00:00
Marco Vermeulen
265df38f75 Moved current candidate features to own feature file. Change output format on gvm current. 2012-12-03 20:48:30 +00:00
Marco Vermeulen
40211c4ab8 Merge pull request #80 from mhurne/current-without-candidate-specified
'gvm current' without candidate specified lists current versions of all installed candidates
2012-12-03 03:29:13 -08:00
Marco Vermeulen
9a1bc10dd9 Remove ws call from help command. 2012-12-02 20:03:42 +00:00
Matt Hurne
39cb44d6c9 'gvm current' without candidate specified lists current versions of all installed candidates 2012-12-01 22:22:32 -05:00
Marco Vermeulen
a8fd5cac5b Remove dependency on zip command. Use unzip -T instead. 2012-11-23 14:01:16 +00:00
Marco Vermeulen
c74459e5ae Move scripts to main src tree, update gradle build. 2012-11-20 16:11:12 +00:00