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

unable to run shell script compiler binary which having dependency internally with another shell script #16

Closed
syamalach opened this issue Jul 25, 2016 · 3 comments

Comments

@syamalach
Copy link

I have two shell scripts which have dependencies. Using shc compiler i created two binaries. But while running one binary, it is unable to resolve depended binary.i am seeing below error
line 1 : ???? :command not found
How to deal with shell scripts which have dependencies.

@syamalach syamalach changed the title unable to run shell script compiler ootputfile which having dependency internally with another shell script unable to run shell script compiler binary which having dependency internally with another shell script Jul 25, 2016
@neurobin
Copy link
Owner

This is a test:

$ cat >script1
#!/bin/bash
echo running script 2
./script2.x
$ cat >script2
#!/bin/bash
echo this is script 2
$ shc -f script1
$ shc -f script2
$ ./script1.x
running script 2
this is script 2
  • Make sure the path is correct
  • If it's in the same directory, make sure you use ./script.x not just script.x

@syamalach
Copy link
Author

syamalach commented Jul 26, 2016

Thanks for your comment, i will add more detail of my question,here i am not directly calling one script from other but i am calling function in one script in another by importing one in another using source. please find my detailed script and question below
http://stackoverflow.com/questions/38568553/unable-to-run-shell-script-compiler-binary-which-having-dependency-internally-wi

@neurobin
Copy link
Owner

You can not source binary files. If you want to source it, you will need to source it as a normal script which is a text file i.e compile only one an keep the other as it is.

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

2 participants