3 # AX-ZSH: Alex' Modular ZSH Configuration
4 # Copyright (c) 2015 Alexander Barton <alex@barton.de>
7 # Include "ax-common.sh":
8 for dir in "$HOME/lib" "$HOME/.ax" /usr/local /opt/ax /usr; do
9 [ -z "$ax_common_sourced" ] || break
10 ax_common="${dir}/lib/ax/ax-common.sh"
11 [ -r "$ax_common" ] && . "$ax_common"
13 if [ -z "$ax_common_sourced" ]; then
19 unset dir ax_common ax_common_sourced
22 if [ -f "$1" -a ! -L "$1" ]; then
23 rm -f "$1.bak" || exit 1
24 mv -v "$1" "$1.bak" || exit 1
31 [ -n "$AXZSH" ] || AXZSH="$HOME/.axzsh"
34 ax_msg - "Installing AX-ZSH into \"$AXZSH\" ..."
36 safe_rm "$AXZSH" || exit 1
37 ln -sv "$PWD" "$AXZSH" || exit 1
39 for f in ~/.zlogin ~/.zlogout ~/.zprofile ~/.zshrc; do
40 safe_rm "$f" || exit 1
41 ln -sv "$AXZSH/ax.zsh" "$f" || exit 1
44 if [ ! -d "$AXZSH/active_plugins" ]; then
45 ax_msg - "Initializing plugin directory \"$AXZSH/active_plugins\" ..."
46 zsh "$AXZSH/bin/axzshctl" reset-plugins
48 ax_msg - "Plugin directory \"$AXZSH/active_plugins\" already exists. Ok."