install type is determined by /bin/zsh env var

pull/119/head
William Ting 12 years ago
parent 448696ef9b
commit bbe54c3b22

@ -39,7 +39,7 @@ function help_msg {
# Default install directory.
prefix=/usr
shell="bash"
shell=`echo ${SHELL} | awk -F/ '{ print $NF }'`
local=
user=${SUDO_USER:-${USER}}
@ -55,6 +55,10 @@ bashrc_file=${user_home}/.bashrc
# Command line parsing
while true; do
case "$1" in
-b|--bash)
shell="bash"
shift
;;
-h|--help|-\?)
help_msg;
exit 0
@ -91,6 +95,15 @@ while true; do
esac
done
# check shell if supported
if [[ ${shell} != "bash" ]] && [[ ${shell} != "zsh" ]]; then
echo "Unsupported shell (${shell}). Use --bash or --zsh to explicitly define shell."
exit 1
else
echo "Installing ${shell} version."
exit 0
fi
# check Python version
python_version=`python -c 'import sys; print(sys.version_info[:])'`
if [[ ${python_version:1:1} -eq 2 && ${python_version:4:1} -lt 6 ]]; then

Loading…
Cancel
Save