Install script: re-ask install directory.

This commit is contained in:
Chen Yufei
2012-12-05 12:23:38 +08:00
parent bc5b3c9fe2
commit aa1323bdf9

View File

@@ -35,16 +35,20 @@ exit_on_fail() {
}
# Get installation directory from user
echo -n "Install cow binary to which directory (absolute path): "
read install_dir </dev/tty
if [ -z $install_dir ]; then
echo "No installation directory given, assuming current directory"
install_dir=`pwd`
fi
if [ ! -d $install_dir ]; then
echo "Installation directory does not exists"
exit 1
fi
while true; do
echo -n "Install cow binary to which directory (absolute path, defaults to current dir): "
read install_dir </dev/tty
if [ -z $install_dir ]; then
echo "No installation directory given, assuming current directory"
install_dir=`pwd`
break
fi
if [ ! -d $install_dir ]; then
echo "Directory $install_dir does not exists"
else
break
fi
done
# Ask OS X user whehter to start COW upon login
start_on_login="n"