diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-04-20 19:31:17 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-04-20 19:34:20 -0400 |
commit | 2f2900213cc8157590f11dcc7988c1a3bb7dc887 (patch) | |
tree | 1894dace4b02568903218cdefb4821bfbd1eda22 /.config/login.sh | |
parent | 8fd263648f772783767ab6eab0ee25ac8772dcab (diff) |
Be careful about shebangs, which shells are used, and what gets executed
Use
- #!/hint/bash for bash that gets sourced (non-executable)
- #!/hint/sh for sh(1) that gets sourced (non-executable)
- #!/bin/sh for sh(1) that gets executed
- #!/usr/bin/env bash for bash that gets executed
To this end, also
- Clean up a couple of related comments
- Fix a couple of bash-isms that I noticed in sh(1) files
- Fix permissions on a couple of files that get sourced
Diffstat (limited to '.config/login.sh')
-rw-r--r-- | .config/login.sh | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/.config/login.sh b/.config/login.sh index 538920a..9499299 100644 --- a/.config/login.sh +++ b/.config/login.sh @@ -1,15 +1,10 @@ -#!/bin/bash -# ~/.profile: executed by the command interpreter for login shells. -# I like that graphical login scripts be configured to load this, so -# it always runs, graphical or not. +#!/hint/sh +# ~/.profile: Sourced by the command interpreter for login shells # -# This file should be executable by /bin/sh, but I'm going to assume bash(1) -# -# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login -# exists. - -# the default umask is set in /etc/profile; for setting the umask -# for ssh logins, install and configure the libpam-umask package. +# Other ~/.*profile scripts may take precedence, or be used instead +# (for example: ~/.bash_{profile,login} takes precidence, and +# ~/.xprofile is used for graphical logins). I dislike duplication, +# so I have them all configured to source this. if [ -z "$HOME" ]; then eval 'HOME=~' |