Install fails spectacularly with both zhshell & bash (Debian 9.4)
Hello! I'm watching your very helpful videos on emacs & came across the one you made on ihsec. I'm very much looking forward to using it--however--I appear to have run into a rather bizarre-looking issue.
I've cloned into a fresh directory two directories down from home: e.g. ~/Source/git/(new dir)
Running sudo make spits out the following:
if [[ "STYPE" == "darwin"* ]]; then cp ihsec.sh /usr/local/bin/ihsec; chmod 755 /usr/local/bin/ihsec; else install -D -m 755 ihsec.sh /usr/local/bin/ihsec; fi
/bin/sh: 1: [[: not found
I have yet to look more closely at the script. I'll return with any findings (I'm just beginning to learn bash scripting, so I may or may not notice what's causing this). Cheers!
I got the same error using Ubuntu 18.04. The key to the error is "/bin/sh:", which shows the make is utilizing the Bourne shell instead of bash, and the "[[ ... ]]" construct is a bash construct.
I was able to fix this by changing the Makefile to read:
if [ "$OSTYPE" = "darwin"*];then cp ihsec.sh /usr/local/bin/ihsec;
etc., etc., for the remainder of the line.
This worked well.
Same here. I would suggest to use install.sh instead of a Makefile.
The error comes because by default GNU Make uses /bin/sh. Setting the SHELL variable inside the makefile to point to /bin/bash does the trick. Someone should make a PR for it.
SHELL := /bin/bash
@a-berg Big time Uncle Dave fan here. Thanks for the idea for my first PR ever on a public repo :)
I made the changes here: https://github.com/daedreth/ihsec/pull/12
I think at this point then Dave needs to then just approve it to have it merged to master. After doing this revision, I was able to have Make resolve the related environment variable to the correct path ('/usr/local/bin') on my Thinkpad running Manjaro.
Thanks! I was too timid to create a PR. Good for you!Sent via the Samsung Galaxy S9+, an AT&T 5G Evolution capable smartphone -------- Original message --------From: SamuelBanya @.> Date: 5/12/22 11:19 PM (GMT-05:00) To: daedreth/ihsec @.> Cc: Arnold Hausmann @.>, Comment @.> Subject: Re: [daedreth/ihsec] Install fails spectacularly with both zhshell & bash (Debian 9.4) (#7) @a-berg Big time Uncle Dave fan here. Thanks for the idea for my first PR ever on a public repo :) I made the changes here: #12 I think at this point then Dave needs to then just approve it to have it merged to master. After doing this revision, I was able to have Make resolve the related environment variable to the correct path ('/usr/local/bin') on my Thinkpad running Manjaro.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>