#!/bin/sh

# Install x first via yarn/npm
# yarn global add @dxos/x

# Absolute path.
DIR=$(cd "$(dirname "$0")/.."; pwd -P)

# Custom installation.
DEST=${ZSH_CUSTOM:-~/.oh-my-zsh/custom}

# Plugin
rm -f "$DEST/plugins/dxos"
ln -s "$DIR/lib/oh-my-zsh/plugins/dxos" "$DEST/plugins/"

# Theme
ln -sf "$DIR/lib/oh-my-zsh/themes/dxos.zsh-theme" "$DEST/themes/dxos.zsh-theme"

echo ""
echo "Installed the dxos oh-my-zsh plugin and theme here: $DEST"
echo "Add the dxos plugin to your .zshrc config."
echo ""
echo "Either via anitgen:"
echo "antigen bundle ~/.oh-my-zsh/custom/plugins/dxos"
echo ""
echo "Or directly:"
echo "plugins=(dxos)"
echo ""
echo "This will set the x alias."
echo "x --help"
echo ""
