Browse files

Correctly handle gems whose bindir is not "bin" (e.g. rspec-core)

  • Loading branch information...
1 parent 9d55c4e commit babdb185fc8c7cd2bef0dc73ec948e5e4d1db8cc @richmeyers richmeyers committed Nov 22, 2011
Showing with 5 additions and 2 deletions.
  1. +5 −2 rpg-package-install.sh
View
7 rpg-package-install.sh
@@ -185,10 +185,13 @@ manifest="$packagedir/$version/manifest"
# Ruby Executables
# ----------------
+ bindir=$(cat "$packagedir/$version/bindir" 2>&1)
+ : ${bindir:=bin}
+
# Write executable scripts into `RPGBIN` and rewrite shebang lines.
- test -d "$pack/bin" && {
+ test -d "$pack/$bindir" && {
mkdir -p "$RPGBIN"
- for file in "$pack/bin"/*
+ for file in "$pack/$bindir"/*
do dest="$RPGBIN/$(basename $file)"
notice "$dest [!]"
sed "s@^#!.*ruby.*@#!$(ruby_command)@" <"$file" >"$dest"

0 comments on commit babdb18

Please sign in to comment.