BrentonEarl / es1-slackware-stuff

My Slackbuilds.org respository for Slackware 14.1. No longer updated.
http://slackbuilds.org/
MIT License
1 stars 0 forks source link

Ruby2.SlackBuild resulting shell script "she bang" refer to #!/usr/bin/ruby #1

Closed BrentonEarl closed 9 years ago

BrentonEarl commented 9 years ago

This SlackBuild installs ruby in an alternate location to prevent itself from overwriting the official ruby binary installed with Slackware.

The "she bang" for each file moved during the build process needs to be patched so that it points to "#!/usr/bin/ruby2"

Relevant lines are 96-106 of file https://github.com/BrentonEarl/es1-slackware-stuff/blob/master/slackbuilds/ruby/ruby2/ruby2.SlackBuild

# Maintaining compatibility with another version of Ruby that is already installed
# Remove this block if you want to just keep this version
( cd $PKG/usr/bin
        mv ruby ruby2
        mv rake rake2
        mv irb irb2
        mv gem gem2
        mv erb erb2
        mv rdoc rdoc2
        mv ri ri2
)

He are the files in question:

root@fourteen_one[~]# head -n 1 /usr/bin/rake2
#!/usr/bin/ruby
root@fourteen_one[~]# head -n 1 /usr/bin/irb2 
#!/usr/bin/ruby
root@fourteen_one[~]# head -n 1 /usr/bin/erb2
#!/usr/bin/ruby
root@fourteen_one[~]# head -n 1 /usr/bin/rdoc2
#!/usr/bin/ruby
root@fourteen_one[~]# head -n 1 /usr/bin/ri2  
#!/usr/bin/ruby
root@fourteen_one[~]# head -n 1 /usr/bin/gem2
#!/usr/bin/ruby
BrentonEarl commented 9 years ago

Tested build on Slackware 64 14.1.

BrentonEarl commented 9 years ago

Uploading to SBo.

BrentonEarl commented 9 years ago

Tested by bug reporter. Verified issue is fixed.