#!/usr/bin/env bash
{%- from "java/map.jinja" import java with context %}
for item in $(ls {{ java.install_dir }}/default/bin)
do
  update-alternatives --install /usr/bin/${item} ${item} {{ java.install_dir }}/default/bin/${item} 1
  update-alternatives --set ${item} {{ java.install_dir }}/default/bin/${item}
done