- replace /usr/local/bin/ruby with /usr/bin/ruby - a very often mistake

OBS-URL: https://build.opensuse.org/package/show/devel:languages:ruby/ruby-common?expand=0&rev=11
This commit is contained in:
Stephan Kulow 2012-07-27 14:03:20 +00:00 committed by Git OBS Bridge
parent 0c14cc3779
commit e12482ed93
2 changed files with 16 additions and 1 deletions

View File

@ -13,13 +13,14 @@ gem_binary=gem
defaultgem=
gemfile=
otheropts=
buildroot=
while [ $# -gt 0 ]
do
case $1 in
--default-gem) defaultgem=$2 ; shift;;
--gem-binary) gem_binary="$2" ; shift;;
--build-root) otheropts="$otheropts $1=$2"; shift;;
--build-root) otheropts="$otheropts $1=$2"; buildroot=$2; shift;;
(--) ;;
(-*) otheropts="$otheropts $1";;
(*) gemfile=$1; otheropts="$otheropts $1"; break;;
@ -29,6 +30,10 @@ done
if [ "x$gemfile" = "x" ] ; then
gemfile=$(find . -maxdepth 2 -type f -name "$defaultgem")
# if still empty, we pick the sources
if [ "x$gemfile" = "x" ] ; then
gemfile=$(find $RPM_SOURCE_DIR -name "$defaultgem")
fi
otheropts="$otheropts $gemfile"
fi
set -x
@ -43,3 +48,8 @@ if test -d $RPM_BUILD_ROOT/usr/bin; then
fi
fi
if [ -d "$buildroot" ]; then
find $buildroot -type f -perm /u+x | while read file; do
sed -i -e 's,#!/usr/local/bin/ruby,#!/usr/bin/ruby,' "$file"
done
fi

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri Jul 27 14:03:05 UTC 2012 - coolo@suse.com
- replace /usr/local/bin/ruby with /usr/bin/ruby - a very often mistake
-------------------------------------------------------------------
Thu Jul 26 11:13:13 UTC 2012 - coolo@suse.com