|
|
|
@ -83,7 +83,7 @@ function main() { |
|
|
|
exit 0 |
|
|
|
;; |
|
|
|
"detect-shell") |
|
|
|
detect_profile |
|
|
|
detect_profile 1 |
|
|
|
print_detect_shell |
|
|
|
exit 0 |
|
|
|
;; |
|
|
|
@ -93,6 +93,8 @@ function main() { |
|
|
|
} |
|
|
|
|
|
|
|
function detect_profile() { |
|
|
|
local detect_for_detect_shell="$1" |
|
|
|
|
|
|
|
case "$shell" in |
|
|
|
bash ) |
|
|
|
if [ -e '~/.bash_profile' ]; then |
|
|
|
@ -112,8 +114,13 @@ function detect_profile() { |
|
|
|
rc='~/.profile' |
|
|
|
;; |
|
|
|
* ) |
|
|
|
profile='your shell'\''s login startup file' |
|
|
|
rc='your shell'\''s interactive startup file' |
|
|
|
if [ -n "$detect_for_detect_shell" ]; then |
|
|
|
profile= |
|
|
|
rc= |
|
|
|
else |
|
|
|
profile='your shell'\''s login startup file' |
|
|
|
rc='your shell'\''s interactive startup file' |
|
|
|
fi |
|
|
|
;; |
|
|
|
esac |
|
|
|
} |
|
|
|
|