Skip to content

Commit 346967e

Browse files
committed
can now specify a version for core and ruby as argument
1 parent 4b82d92 commit 346967e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

build.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -362,20 +362,22 @@ pack_ruby() {
362362

363363
pkg="jni"
364364

365-
test "$#" -ne 1 || pkg=$1
365+
test "$#" -eq 0 || pkg=$1
366366

367367
case $pkg in
368-
ruby) build_ruby
368+
ruby) RUBY_VERSION=${2:-$RUBY_VERSION}
369+
build_ruby
369370
;;
370-
core|cores) build_cores
371+
core|cores) CORE_VERSION=${2:-$CORE_VERSION}
372+
build_cores
371373
copy_jni_libs
372374
;;
373375
jni) build_jni
374376
copy_jni_libs
375377
;;
376378
*)
377379
scriptname=$(basename "$0")
378-
echo -e "Usage: $scriptname <task>\n\ntask must be one of:\n - ruby : build the ruby archive\n - cores: build native tools used by cSploit (default)" >&2
380+
echo -e "Usage: $scriptname <task> [version]\n\ntask must be one of:\n - ruby : build the ruby archive\n - cores: build native tools used by cSploit (default)" >&2
379381
;;
380382
esac
381383

0 commit comments

Comments
 (0)