From 2e1bc8da3b9fd585788112c035c8522ee79c74a4 Mon Sep 17 00:00:00 2001 From: xpamych Date: Sat, 25 Feb 2023 14:00:45 +0300 Subject: [PATCH] sed --- hlna-git/postinstall.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/hlna-git/postinstall.sh b/hlna-git/postinstall.sh index ea47175..2c7f859 100644 --- a/hlna-git/postinstall.sh +++ b/hlna-git/postinstall.sh @@ -1,14 +1,14 @@ #!/usr/bin/env bash if test -f $HOME/.zshrc; then -echo 'alias hlna="hlna.py"' >> $HOME/.zshrc -echo 'alias hlna-bot="hlna-bot.py"' >> $HOME/.zshrc -source ~/.zshrc +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 -echo 'alias hlna="hlna.py"' >> $HOME/.config/fish/config.fish -echo 'alias hlna-bot="hlna-bot.py"' >> $HOME/.config/fish/config.fish +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 -echo 'alias hlna="hlna.py"' >> $HOME/.bashrc -echo 'alias hlna-bot="hlna-bot.py"' >> $HOME/.bashrc +sed -i -e '$aalias hlna="hlna.py"' >> $HOME/.bashrc +sed -i -e '$aalias hlna-bot="hlna-bot.py"' >> $HOME/.bashrc source ~/.bashrc fi \ No newline at end of file