Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 33 lines (27 sloc) 0.711 kB
fa76961 @rtomayko pgem-build takes care of native extensions. this fuckers usable
authored
1 #!/bin/sh
2 set -e
4b1ed8b @rtomayko s/pgem/rpg/g on entire project
authored
3 . rpg-sh-setup
fa76961 @rtomayko pgem-build takes care of native extensions. this fuckers usable
authored
4
9abeb5c @rtomayko usage and logging cleanup across the board
authored
5 [ "$*" ] || set -- '--help'
6 ARGV="$@"
7 USAGE '${PROGNAME} <path>
8 Build native extensions for a package.
9
10 The paths to newly built libraries are written on standard output. Exits with
11 success if the build succeeds, failure otherwise.'
12
fa76961 @rtomayko pgem-build takes care of native extensions. this fuckers usable
authored
13 path="$(cd "$1" && pwd)"
14
15 test -d "$path/ext" ||
16 exit 0
17
18 find "$path/ext" -name "extconf.rb" |
19 while read file
20 do
496b589 @rtomayko shell quoting safety
authored
21 heed "$(basename "$path") $(basename $(dirname "$file"))"
22 cd "$(dirname "$file")"
fa76961 @rtomayko pgem-build takes care of native extensions. this fuckers usable
authored
23 if (ruby extconf.rb &&
0c1475e @rtomayko rpg-build doesn't care if there's no clean target
authored
24 { make clean || true; } &&
fa76961 @rtomayko pgem-build takes care of native extensions. this fuckers usable
authored
25 make) 1> build.log 2>&1
26 then
4b1ed8b @rtomayko s/pgem/rpg/g on entire project
authored
27 $RPGSHOWBUILD && cat build.log 1>&2
496b589 @rtomayko shell quoting safety
authored
28 find "$path" -name "*.$(ruby_dlext)"
fa76961 @rtomayko pgem-build takes care of native extensions. this fuckers usable
authored
29 else
30 cat build.log 1>&2
31 fi
32 done
Something went wrong with that request. Please try again.