Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

do_install fails because of missing DESTDIR #1

Closed
olafmandel opened this issue Nov 19, 2014 · 0 comments · Fixed by #2
Closed

do_install fails because of missing DESTDIR #1

olafmandel opened this issue Nov 19, 2014 · 0 comments · Fixed by #2

Comments

@olafmandel
Copy link
Contributor

do_install() fails because it tries to write to the root directory.

At least on my system, it is not possible to locally set an environment variable on the command line calling a Bash function (like do_install() does). Example:

#!/bin/sh

a() {
    sh -c 'echo bar=\"$bar\"'
}

b() {
    sh -c 'echo baz=\"$baz\"'
}

foo=123 sh -c 'echo foo=\"$foo\"'
bar=456 a
export baz=789
b
$SHELL --version | head -1

Output:

foo="123"
bar=""
baz="789"
GNU bash, version 4.2.37(1)-release (x86_64-pc-linux-gnu)

So setting a variable locally before calling a "real" command works (foo) and setting a variable globally before calling a function works (baz). But setting a variable locally before calling a function fails (bar).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant