-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
start moving stuff out to .shared_env.d/
- Loading branch information
Showing
5 changed files
with
63 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# -*- mode: sh -*- | ||
|
||
: ${HOST:=${HOSTNAME:-`hostname`}} | ||
: ${HOSTNAME:=$HOST} | ||
|
||
# Let's not make this *too* sticky because dhcp might change the host | ||
#export HOST HOSTNAME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# -*- mode: sh -*- | ||
|
||
# Can come in handy too, if the shell sets it (bash and zsh do). | ||
export OSTYPE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# -*- mode: sh -*- | ||
|
||
# zsh sets USERNAME, GROUPS, and E?[UG]ID | ||
# bash only sets E?UID | ||
USER=${USERNAME:-`id -un`} | ||
: ${USERNAME:=$USER} | ||
export USER USERNAME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# -*- mode: sh -*- | ||
|
||
export PERL5LIB | ||
|
||
add_perl5lib_path () { | ||
new_path="$1" | ||
case "$PERL5LIB" in | ||
'') | ||
PERL5LIB=$new_path | ||
;; | ||
|
||
$new_path|*:$new_path|$new_path:*|*:$new_path:*) | ||
: #echo "$newpaths already in \$PERL5LIB" | ||
;; | ||
*) | ||
PERL5LIB=$new_path:$PERL5LIB | ||
;; | ||
esac | ||
} | ||
|
||
for dir in $ZDOTDIRREVPATH; do | ||
add_perl5lib_path $dir/lib/perl5 | ||
add_perl5lib_path $dir/lib/perl5/site_perl | ||
|
||
# # Use a cache to avoid invoking Perl during startup of every single | ||
# # shell (even non-interactive ones). | ||
# cachedir=$dir/.config/perl | ||
# cache=$cachedir/pmdir_relative_path | ||
# if [ -e $cache ]; then | ||
# pmdir_relative_path=$(<$cache) | ||
# else | ||
# # This trick comes from Stow's configure.ac | ||
# pmdir_relative_path=` | ||
# perl -MConfig \ | ||
# -wle '($_ = $Config{installsitelib}) | ||
# =~ s!^\Q$Config{siteprefix}/!!; \ | ||
# print'` | ||
# mkdir -p $cachedir | ||
# echo "$pmdir_relative_path" > $cache | ||
# fi | ||
# | ||
# if [ -n "$pmdir_relative_path" ]; then | ||
# add_perl5lib_path $dir/$pmdir_relative_path | ||
# fi | ||
done |