on FreeBSD, stat behaves as on OpenBSD. #1223

Merged
merged 1 commit into from Oct 12, 2012

Projects

None yet

2 participants

@mat813
Contributor
mat813 commented Oct 12, 2012

When upgrading on FreeBSD I got :

$ curl -L https://get.rvm.io | sudo bash -s head
Downloading RVM from wayneeseguin branch master

Upgrading the RVM installation in /usr/local/rvm/
stat: illegal option -- c
usage: stat [-FLnq] [-f format | -l | -r | -s | -x] [-t timefmt] [file ...]
stat: illegal option -- c
usage: stat [-FLnq] [-f format | -l | -r | -s | -x] [-t timefmt] [file ...]
    RVM system user group 'rvm' exists, proceeding with installation.
    Installing rvm gem in 3 gemsets ............

easy fix.

@mpapis mpapis commented on the diff Oct 12, 2012
scripts/functions/installer
@@ -617,7 +617,7 @@ get_file_group()
{
case "$(uname)" in
"Darwin") stat -f "%Sg" "$1" ;;
- "OpenBSD") stat -f "%Sg" "$1" ;;
+ "OpenBSD" | "FreeBSD") stat -f "%Sg" "$1" ;;
mpapis
mpapis Oct 12, 2012 Owner

ok, this one is new for me, I did not know you can use spaces with quotes and alternatives here, looks more readable!

mat813
mat813 Oct 12, 2012 Contributor

Well, in this case, you could even do:

OpenBSD | FreeBSD)

because there's no real need for quotes.

mat813
mat813 Oct 12, 2012 Contributor

Could even do

*BSD)

because I think NetBSD or DragonflyBSD or the other kids on the block would work the same, but I don't have anything to test with, and they are not supposed to be supported at all :-)

mpapis
mpapis Oct 12, 2012 Owner

open PR with Darwin|*BSD) - I will merge it for master, so it will be available in 1.17 - there is nothing holding us back to not support all the BSD ... maybe limited support - but still always better then nothing ;)

mat813
mat813 Oct 12, 2012 Contributor

Ah, I pushed in the branch I had openned, but you already had merged the patch, too bad :-)
Should I open a new pull request ?

mpapis
mpapis Oct 12, 2012 Owner

please open a new PR - it will be targeted for RVM 1.17

@mpapis mpapis was assigned Oct 12, 2012
@mpapis mpapis merged commit 8e9f72e into rvm:master Oct 12, 2012

1 check passed

default The Travis build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment