#!/bin/bash # jdk # # Douglas Thrift # # $Id$ (echo -e $bright$red; cat /usr/jdk$version/LICENSE) | less -Ers echo -en $reset declare agreed while [[ -z $agreed ]]; do read -ep 'Do you agree to the above license terms? [yes or no] ' reply case $reply in ([yY]|[yY][eE][sS]) agreed=1 ;; ([nN]|[nN][oO]) echo "If you don't agree to the license you can't install this software" return 1 ;; esac done registervm "/usr/jdk$version/bin/java # Sun JDK $version"