summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-04-28 15:09:07 -0400
committermidipix <writeonce@midipix.org>2016-04-28 15:21:02 -0400
commit6689068df459076614129bdb9505ccbcef07e34c (patch)
treeaf251571ad4fd4ec9a0a0eb11681c170d3c5e8f8
parent6cc0ddb5b0c44e855c6638d3b6838e0aa0f3e9e8 (diff)
downloadslibtool-6689068df459076614129bdb9505ccbcef07e34c.tar.bz2
slibtool-6689068df459076614129bdb9505ccbcef07e34c.tar.xz
install mode: work around non-conforming uses of --mode=install.
-rw-r--r--src/logic/slbt_exec_install.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/logic/slbt_exec_install.c b/src/logic/slbt_exec_install.c
index c4fd40d..66cf7f0 100644
--- a/src/logic/slbt_exec_install.c
+++ b/src/logic/slbt_exec_install.c
@@ -442,6 +442,7 @@ int slbt_exec_install(
{
int ret;
char ** argv;
+ char ** iargv;
char ** src;
char ** dst;
struct slbt_exec_ctx * actx;
@@ -464,15 +465,19 @@ int slbt_exec_install(
/* initial state, install mode skin */
slbt_reset_arguments(ectx);
slbt_disable_placeholders(ectx);
- argv = ectx->cargv;
+ iargv = ectx->cargv;
+
+ /* work around non-conforming uses of --mode=install */
+ if (!(strcmp(iargv[0],"/bin/sh")) || !strcmp(iargv[0],"/bin/bash"))
+ iargv++;
/* missing arguments? */
- if (!argv[1] && (dctx->cctx->drvflags & SLBT_DRIVER_VERBOSITY_USAGE))
+ if (!iargv[1] && (dctx->cctx->drvflags & SLBT_DRIVER_VERBOSITY_USAGE))
return slbt_install_usage(dctx->program,0,options,0);
/* <install> argv meta */
if (!(meta = argv_get(
- argv,
+ iargv,
options,
dctx->cctx->drvflags & SLBT_DRIVER_VERBOSITY_ERRORS
? ARGV_VERBOSITY_ERRORS
@@ -485,7 +490,7 @@ int slbt_exec_install(
dest = 0;
last = 0;
- *argv++ = ectx->cargv[0];
+ *argv++ = iargv[0];
for (entry=meta->entries; entry->fopt || entry->arg; entry++) {
if (entry->fopt) {