alr-repo/hlna-git/postinstall.sh
2023-02-25 14:00:45 +03:00

14 lines
530 B
Bash

#!/usr/bin/env bash
if test -f $HOME/.zshrc; then
sed -i -e '$aalias hlna="hlna.py"' $HOME/.zshrc
sed -i -e '$aalias hlna-bot="hlna-bot.py"' $HOME/.zshrc
source $HOME/.zshrc
elif test -f $HOME/.config/fish/config.fish; then
sed -i -e 'alias hlna="hlna.py"' $HOME/.config/fish/config.fish
sed -i -e 'alias hlna-bot="hlna-bot.py"' $HOME/.config/fish/config.fish
source ~/.config/fish/config.fish
else
sed -i -e '$aalias hlna="hlna.py"' >> $HOME/.bashrc
sed -i -e '$aalias hlna-bot="hlna-bot.py"' >> $HOME/.bashrc
source ~/.bashrc
fi