bin/setup.sh in getch-0.0.9 vs bin/setup.sh in getch-0.1.0
- old
+ new
@@ -70,13 +70,15 @@
set_shell() {
your_shell=~/.bashrc
[ -f ~/.zshrc ] && your_shell=~/.zshrc
[ -f "$your_shell" ] && {
- if ! grep -q ".gem/ruby/[0-9.]*/bin" "$your_shell" ; then
+ if ! grep -q "ruby" "$your_shell" ; then
echo "export PATH=\$PATH:$(ruby -e 'puts Gem.user_dir')/bin" >> "$your_shell"
fi
- . "$your_shell"
+ if $(. "$your_shell") ; then
+ echo "Shell loaded"
+ fi
}
}
main() {
search_ruby