19683: Improves code style.
[arvados.git] / tools / arvbox / lib / arvbox / docker / common.sh
index 4e95bdedfc465ac0c3c25065e2dd778f0b949775..80fb3fa8205683bd64c046535ef06252df20f84e 100644 (file)
@@ -74,6 +74,11 @@ run_bundler() {
        # If present, use the one associated with rails workbench or API
        BUNDLER=$PWD/bin/bundle
     fi
+
+    if test -z "$(flock $GEMLOCK /var/lib/arvados/bin/gem list | grep arvados | grep dev)" ; then
+        (cd /usr/src/arvados/sdk/ruby && \
+        /var/lib/arvados/bin/gem build arvados.gemspec && flock $GEMLOCK /var/lib/arvados/bin/gem install `ls -1 *.gem | sort -r | head -n1`)
+    fi
     if ! flock $GEMLOCK $BUNDLER install --verbose --local --no-deployment $frozen "$@" ; then
         flock $GEMLOCK $BUNDLER install --verbose --no-deployment $frozen "$@"
     fi