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