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

Cannot pass arguments to post-install shell script (--after-install) #1161

Open
matterubio opened this issue Jul 19, 2016 · 3 comments
Open

Comments

@matterubio
Copy link

I would like to know if there is an issue here. I want to add an input argument to my --after-install shell script. fpm seems to think the argument (which is currently separated by a whitespace) is something to package, unfortunately.

I usually get the following error message:

Invalid package configuration: Cannot package the path '[argument]', does it exist? {:level=>:error}

The argument is a path like /home/matterubio/Documents. The idea is to pass this into the script, which starts currently in the root directory on my Ubuntu 14.04. I need this script, though, to start in the destination directory of the fpm call.

Many thanks in advance!

@jordansissel
Copy link
Owner

The --after-install flag takes exactly one argument, a path to a script to provide to the package installation system.

In your case, what you probably need to do is create a short script that invokes whatever program you need with whatever arguments. For example:

after.sh

#!/bin/sh
exec /path/to/my/thing some arguments here

fpm ... --after-install after.sh ...

@matterubio
Copy link
Author

Jordan,

Thank you! I am attempting to circumvent the issue and believe that adding
the --template-values flag might solve it.

Sincerely,

Matthew E. Rubio

Purdue University
School of Electrical & Computer Engineering
rubiom@purdue.edu
(571) 212-1894

On Jul 24, 2016 01:31, "Jordan Sissel" notifications@github.com wrote:

The --after-install flag takes exactly one argument, a path to a script
to provide to the package installation system.

In your case, what you probably need to do is create a short script that
invokes whatever program you need with whatever arguments. For example:

after.sh

#!/bin/sh
exec /path/to/my/thing some arguments here

fpm ... --after-install after.sh ...


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#1161 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ATmFI8dq0zzX8cX0xzcYwyrP6K2aAjc7ks5qYviagaJpZM4JQRVM
.

@nicobrevin
Copy link
Contributor

nicobrevin commented Jun 28, 2017 via email

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

No branches or pull requests

3 participants