You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
298 B
20 lines
298 B
11 years ago
|
#
|
||
|
# Displays the path to the Ruby application root directory.
|
||
|
#
|
||
|
# Authors:
|
||
|
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||
|
#
|
||
|
|
||
|
local root_dir="$PWD"
|
||
|
|
||
|
while [[ "$root_dir" != '/' ]]; do
|
||
|
if [[ -f "$root_dir/Gemfile" ]]; then
|
||
|
print "$root_dir"
|
||
|
break
|
||
|
fi
|
||
|
root_dir="$root_dir:h"
|
||
|
done
|
||
|
|
||
|
return 1
|
||
|
|