fuel / core

Fuel PHP Framework - The core of the Fuel v1 framework
http://fuelphp.com
813 stars 345 forks source link

Can't install oil into /usr/bin on El Capitan #1957

Closed kenjis closed 8 years ago

kenjis commented 8 years ago

We should change the default PREFIX.

See

WanWizard commented 8 years ago

What do you mean by "prefix"? You mean the path in which it is installed?

What paths are in the default PATH on a Mac? /usr/local for example does not exist in a linux environment, but /user/local/sbin is.

kenjis commented 8 years ago

Yes, I mean PREFIX in installer oil: https://github.com/fuel/installer/blob/master/oil#L5

Actually, I have not upgraded to El Capitan yet. But as you know, you can't install anything in /usr/bin on El Capitan, so the path should be /usr/local/bin.

/usr/local for example does not exist in a linux environment, but /user/local/sbin is.

It is better that we check the OS and change the default path?

All I want to say is according to the documentation we can't install oil command on El Capitan. We should fix it.

kenjis commented 8 years ago

By the way, it seems get.fuelphp.com/oil and http://get.fuelphp.com/installer.sh are not updated.

$ curl get.fuelphp.com/oil
#!/bin/bash

PREFIX="/usr/bin/"

install_oil() {

    if [ `which sudo` ]; then
        sudo sh -c "curl --silent http://get.fuelphp.com/installer.sh > ${PREFIX}oil"
        sudo chmod +x ${PREFIX}oil
    else
        sh -c "curl --silent http://get.fuelphp.com/installer.sh > ${PREFIX}oil"
        chmod +x ${PREFIX}oil
    fi
}

#
# Handle execution
#
main() {

  # Start installation
  install_oil
  exit 0
}

main
WanWizard commented 8 years ago

It seems that most linux distributions have /usr/local/bin in the path by default too, so it should not be a problem to make that the default PREFIX?

WanWizard commented 8 years ago

Runs fine on the distro's I have here, checked Ubuntu as well. So I made the change.

Also updated http://get.fuelphp.com, git updates were disabled on the server due to hanging git processes.