summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <shumakl@purdue.edu>2014-04-21 11:57:06 -0400
committerLuke Shumaker <shumakl@purdue.edu>2014-04-21 11:57:06 -0400
commitf4453acbfdb1ac77a8bffc05635daf7aa3fee605 (patch)
tree29af6bb6b4f7189f9064046f64057350837b8c5d
parentb087c44642ae8a22a58a3763ea1b595b4be0bc07 (diff)
touch up PATHs being set in login.sh
-rw-r--r--.config/login.local.sh3
-rw-r--r--.config/login.sh19
-rwxr-xr-x.local/bin/config-path24
3 files changed, 24 insertions, 22 deletions
diff --git a/.config/login.local.sh b/.config/login.local.sh
index d970000..bead00c 100644
--- a/.config/login.local.sh
+++ b/.config/login.local.sh
@@ -5,3 +5,6 @@ fi
if { [[ $LANG = C ]] || [[ -z $LANG ]]; } && grep '^en_US.UTF-8\s' /etc/locale.gen &>/dev/null; then
export LANG=en_US.UTF-8
fi
+if [[ -z $GOROOT ]]; then
+ export GOROOT=/homes/shumakl/.prefix.$(uname -m)/go
+fi
diff --git a/.config/login.sh b/.config/login.sh
index 4634685..f1b7838 100644
--- a/.config/login.sh
+++ b/.config/login.sh
@@ -98,22 +98,3 @@ if [[ -z $XAUTHORITY ]]; then
export XAUTHORITY=$HOME/.Xauthority
#export XAUTHORITY=$HOME/.sessions/Xauthority
fi
-
-# D-Bus
-# if [[ -z $DBUS_SESSION_BUS_ADDRESS ]] && type dbus-launch &>/dev/null; then
-# # I want a separate instance for each login
-# #dbus-launch > "${HOME}/.cache/sessions/dbus"
-# #. "${HOME}/.cache/sessions/dbus"
-# eval `dbus-launch`
-
-# export DBUS_SESSION_BUS_ADDRESS
-# export DBUS_SESSION_BUS_PID
-# fi
-
-export GOROOT=/homes/shumakl/.prefix.x86_64/go
-export PATH="/home/luke/perl5/bin:$PATH";
-export PERL5LIB="/home/luke/perl5/lib/perl5/i686-linux-thread-multi:/home/luke/perl5/lib/perl5";
-export PERL5LIB=/homes/shumakl/.prefix.x86_64/lib64/perl5:$PERL5LIB
-export PERL_LOCAL_LIB_ROOT="/home/luke/perl5";
-export PERL_MB_OPT="--install_base /home/luke/perl5";
-export PERL_MM_OPT="INSTALL_BASE=/home/luke/perl5";
diff --git a/.local/bin/config-path b/.local/bin/config-path
index 6b9019c..99f0910 100755
--- a/.local/bin/config-path
+++ b/.local/bin/config-path
@@ -24,28 +24,46 @@ in_array() {
# Import existing values
IFS=: paths=($PATH)
+IFS=: manpaths=($MANPATH)
IFS=: rubylibs=($RUBYLIB)
+IFS=: perl5libs=($PERL5LIB)
# Scan through prefixes
for prefix in "${prefixes[@]}"; do
# PATH
- dir="$prefix/bin"
- if [[ -d "$dir" ]] && ! in_array "$dir" "${paths[@]}"; then
- paths=("$dir" "${paths[@]}")
+ for dir in "$prefix/bin" "$prefix/sbin"; do
+ if [[ -d "$dir" ]] && ! in_array "$dir" "${paths[@]}"; then
+ paths=("$dir" "${paths[@]}")
+ fi
+ done
+ # MANPATH
+ dir="$prefix/share/man"
+ if [[ -d "$dir" ]] && ! in_array "$dir" "${manpaths[@]}"; then
+ manpaths=("$dir" "${manpaths[@]}")
fi
# RUBYLIB
dir="$prefix/lib"
if [[ -d "$dir" ]] && ! in_array "$dir" "${rubylibs[@]}"; then
rubylibs=("$dir" "${rubylibs[@]}")
fi
+ # PERL5LIB
+ for dir in "$prefix"/lib*/perl5; do
+ if [[ -d "$dir" ]] && in_array "$dir" "${manpaths[@]}"; then
+ perl5libs=("$dir" "${perl5libs[@]}")
+ fi
+ done
done
# Finally, print our values
IFS=: PATH="${paths[*]}"
+IFS=: MANPATH="${manpaths[*]}"
IFS=: RUBYLIB="${rubylibs[*]}"
+IFS=: PERL5LIB="${perl5libs[*]}"
# The sed bit here is the only time we call an external program
{
declare -p PATH
+ declare -p MANPATH
declare -p RUBYLIB
+ declare -p PERL5LIB
} | sed 's/^declare \(-\S* \)*//'