Files
scm_breeze/install.sh
Trey Hunner 0d7ee4866b Remove dependence on bash in install.sh
Replace bashisms with syntax supported by all posix-compliant shells.
The echo command does not support -e in many simplified shells
(including dash) so printf is favored.  The [[ ... ]] notation is also
not accepted by all posix shells so [ ... ] notation is used instead.
2011-10-20 10:50:57 -07:00

21 lines
657 B
Bash
Executable File

#!/bin/sh
# This loads SCM Breeze into the shell session.
exec_string='[ -s "$HOME/.scm_breeze/scm_breeze.sh" ] && . "$HOME/.scm_breeze/scm_breeze.sh"'
# Add line to bashrc and zshrc if not already present.
for rc in bashrc zshrc; do
if [ -s "$HOME/.$rc" ] && ! grep -q "$exec_string" "$HOME/.$rc"; then
printf "\n$exec_string\n" >> "$HOME/.$rc"
printf "== Added SCM Breeze to '~/.$rc'\n"
fi
done
# Load SCM Breeze update scripts
. "$HOME/.scm_breeze/lib/scm_breeze.sh"
# Create '~/.*.scmbrc' files from example files
_create_or_patch_scmbrc
echo "== Run 'source ~/.bashrc' or 'source ~/.zshrc' to load SCM Breeze into your current shell."