aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2020-10-02 12:59:47 -0300
committerSilvio Rhatto <rhatto@riseup.net>2020-10-02 12:59:47 -0300
commit95b5201c12471f1885240239b23214609fb0e427 (patch)
treee1c3e66227f1d5cc7aadd7e1e4513c50860c5e63
parent2d9ea961ed183d60d6e5df6c8e56b66442d73441 (diff)
downloadprofile-95b5201c12471f1885240239b23214609fb0e427.tar.gz
profile-95b5201c12471f1885240239b23214609fb0e427.tar.bz2
Feature: add local gems into PATH
-rw-r--r--profile.dot.link9
1 files changed, 9 insertions, 0 deletions
diff --git a/profile.dot.link b/profile.dot.link
index 81253fd..22c577d 100644
--- a/profile.dot.link
+++ b/profile.dot.link
@@ -89,6 +89,15 @@ if [ -e "$HOME/apps/go" ]; then
PATH="$GOPATH/bin:$PATH"
fi
+# Add local gems into PATH
+if which gem &> /dev/null; then
+ LOCAL_GEMPATH="`gem environment gempath | cut -d : -f 1`/bin"
+
+ if [ -d "$LOCAL_GEMPATH" ]; then
+ PATH="$LOCAL_GEMPATH:$PATH"
+ fi
+fi
+
# Add local NixOS into PATH
if [ -e "$HOME/.nix-profile/etc/profile.d/nix.sh" ]; then
. $HOME/.nix-profile/etc/profile.d/nix.sh