Skip to content

Commit

Permalink
Now when it prompts you for a directory, it properly expands ~ and en…
Browse files Browse the repository at this point in the history
…vironment variables like \$HOME.
  • Loading branch information
chicagoscala committed Sep 5, 2013
1 parent 049d2a6 commit f066f36
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bin/installer.bash
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ esac

mesos_installation="/tmp"

# Wait for a user to type in a directory, then evaluate it to expand
# environment variables, like $HOME, and ~.
function read_dir {
read dest_dir
eval echo $dest_dir
Expand All @@ -34,7 +36,7 @@ function install_mesos {
case $installed_already in
no)
echo "Type the target directory (absolute path) where you would like mesos to be installed followed by [ENTER]:"
read dest_dir
dest_dir=$(read_dir)
if [[ -d "$dest_dir/src" ]]; then
echo "A Mesos install already exists in this directory, would you like to delete it? Type 'yes' or 'no' followed by [ENTER]"
read delete_dest_dir
Expand Down Expand Up @@ -63,7 +65,7 @@ function install_mesos {
;;
yes)
echo "Type the path of the compiled mesos installation followed by [ENTER]:"
read dest_dir
dest_dir=$(read_dir)
mesos_installation="$dest_dir"
echo "Skipping mesos installation"
;;
Expand Down

0 comments on commit f066f36

Please sign in to comment.