|
|
@ -9,10 +9,7 @@ function bashrc_count_lines { |
|
|
|
} |
|
|
|
|
|
|
|
function bashrc_watch_start { |
|
|
|
if [ -n "${BASHRC_LINES+set}" ]; then |
|
|
|
echo "provided so far BASHRC_LINES=$BASHRC_LINES" |
|
|
|
else |
|
|
|
echo 'count lines of .bashrc' |
|
|
|
if [[ -z "${BASHRC_LINES+set}" ]]; then |
|
|
|
BASHRC_LINES=$(bashrc_count_lines) |
|
|
|
fi |
|
|
|
} |
|
|
@ -20,6 +17,7 @@ function bashrc_watch_start { |
|
|
|
function bashrc_watch_end { |
|
|
|
bashrc_lines=$(bashrc_count_lines) |
|
|
|
if [[ "$BASHRC_LINES" -lt "$bashrc_lines" ]]; then |
|
|
|
echo |
|
|
|
echo '*****************************' |
|
|
|
echo '* BASHRC has evolved *' |
|
|
|
echo '* please execute: *' |
|
|
@ -27,8 +25,7 @@ function bashrc_watch_end { |
|
|
|
echo "* source \$HOME/.bashrc *" |
|
|
|
echo '* *' |
|
|
|
echo '*****************************' |
|
|
|
else |
|
|
|
echo 'everything is fine!' |
|
|
|
echo |
|
|
|
fi |
|
|
|
} |
|
|
|
|
|
|
@ -52,8 +49,9 @@ function bashrc_env_sync { |
|
|
|
|
|
|
|
set -Eeu |
|
|
|
bashrc_watch_start |
|
|
|
|
|
|
|
echo 'init' |
|
|
|
bashrc_env_sync 'SESSION_RESTART' true |
|
|
|
echo 'end' |
|
|
|
|
|
|
|
echo 'suite' |
|
|
|
bashrc_watch_end |