summaryrefslogtreecommitdiff
path: root/rvs/wrapper
diff options
context:
space:
mode:
authorLuke Shumaker <luke@HP-dv6426us-u904.(none)>2009-10-28 21:43:58 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-06-26 00:30:18 -0600
commit83befb03851266035094f99f9c31fc7524c9e74a (patch)
tree43f0be2c376b774bb9159b199e7a1f0de131878c /rvs/wrapper
parent9efb5c3e6a370aab6fa962ab5c558437264a6fde (diff)
add support for running a command from a specific plugin to runcom
this feature should only be used internally by plugins
Diffstat (limited to 'rvs/wrapper')
-rw-r--r--rvs/wrapper/runcom.c15
-rw-r--r--rvs/wrapper/rvs.sh4
2 files changed, 16 insertions, 3 deletions
diff --git a/rvs/wrapper/runcom.c b/rvs/wrapper/runcom.c
index 10e9919..5928bb3 100644
--- a/rvs/wrapper/runcom.c
+++ b/rvs/wrapper/runcom.c
@@ -40,7 +40,20 @@ main ( int argc, char *argv[] )
struct plugin *plugins;
plugins=load_plugins(stdin);
struct plugin_command_list *list;
- list=plugin_find_commands(plugins,argv[1]);
+ if ( strchr(argv[1],'/') == NULL )
+ list=plugin_find_commands(plugins,argv[1]);
+ else {
+ /* this is a command for a specific plugin */
+ list=xmalloc(sizeof(*list));
+ list->command=plugin_depend_parse(stralloc(argv[1]));
+ list->next=NULL;
+ if ( list->command == NULL ) {
+ /* plugin_depend_parse should fail the program*\
+ \* on its own, but just to be safe... */
+ plugin_free_list(list);
+ list=NULL;
+ }
+ }
if (list==NULL)
error(EXIT_FAILURE,0,"unrecognized command `%s'",
argv[1]);
diff --git a/rvs/wrapper/rvs.sh b/rvs/wrapper/rvs.sh
index a515f2d..0001d66 100644
--- a/rvs/wrapper/rvs.sh
+++ b/rvs/wrapper/rvs.sh
@@ -1,6 +1,6 @@
-#!@SHELL@
+#!/bin/sh
name='@name@'
-ver='0.8r61'
+ver='0.9'
# Copyright (C) 2009 Luke Shumaker
#
# This file is part of rvs.