#!/bin/bash # jre # # Douglas Thrift # # $Id$ (echo -e $bright$red; cat /usr/jre$version_new/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 unregistervm /usr/jre$version_old/bin/java registervm "/usr/jre$version_new/bin/java # Sun JRE $version_new"