So I want to curl home brew from a bash script I made, but when I put it as condition it marks me the following error:
line 3: [/usr/bin/ruby: No such file or directory
But when I put it outside of the if statement and execute the script, it actually works.
This is my code:
#!/bin/bash
if [/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"]
then
#if curled then do stuff here
fi
Anyone knows why it doesn't locates the file?