paulbsd-salt/states/java/templates/update-alternatives-java.sh.j2
2023-03-31 17:22:18 +02:00

9 lines
386 B
Django/Jinja

#!/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
echo "changed=no comment='java alternatives up to date' whatever=123"