Skip to content

Commit

Permalink
Take into account binaries like selenium-manager during build
Browse files Browse the repository at this point in the history
selenium-manager lives inside bin/linux, not bin, so the build script
crashed in the final steps.

This fix skips subdirectories.
  • Loading branch information
danidoni committed Sep 19, 2024
1 parent f5e6b96 commit 182f308
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions dist/obs-bundled-gems.spec
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,14 @@ for bin in %{buildroot}%_libdir/obs-api/ruby/*/bin/*; do
sed -i -e '1!b;s,^#!.*/bin/env ruby.*$,#!%{__obs_ruby_interpreter},' $bin
done
for bin in %{buildroot}%_libdir/obs-api/ruby/*/gems/*/bin/*; do
# Some gems have subdirectories inside bin, so we skip them
if [[ -f $bin ]]; then
sed -i -e '1!b;s,^#!/usr/bin/ruby.*$,#!%{__obs_ruby_interpreter},' $bin
sed -i -e '1!b;s,^#!/usr/bin/env ruby.*$,#!%{__obs_ruby_interpreter},' $bin
fi
done
# And here process those binaries in subdirectories
for bin in %{buildroot}%_libdir/obs-api/ruby/*/gems/*/bin/linux/*; do
sed -i -e '1!b;s,^#!/usr/bin/ruby.*$,#!%{__obs_ruby_interpreter},' $bin
sed -i -e '1!b;s,^#!/usr/bin/env ruby.*$,#!%{__obs_ruby_interpreter},' $bin
done
Expand Down

0 comments on commit 182f308

Please sign in to comment.