diff --git a/helium_helper.sh b/helium_helper.sh index 494b272..2179147 100755 --- a/helium_helper.sh +++ b/helium_helper.sh @@ -81,7 +81,7 @@ local_check() { ### INSTALL install_helium() { if [ -f "$INSTALL_PATH/$APP_NAME.AppImage" ] ; then - echo -e "\n ${CYN}$APP_NAME_LONG AppImage found! Trying to update...${CRS}" + echo -e "\n ${YEL}$APP_NAME_LONG AppImage found! Trying to update...${CRS}" update_helium exit @@ -176,10 +176,18 @@ add_alias() { ### WORKS BUT NEEDS WORK fi if [ -f "$HOME/.zshrc" ] ; then + if [ "$(cat $HOME/.zshrc | grep "$ALIAS")" ] ; then + echo -e "\n ${LCY}$ALIAS ${GRN}already present in${CRS} $HOME/.zshrc" + exit + fi echo "alias $ALIAS=\"$SCRIPT_PATH/$SCRIPT_FILE_NAME\"" >> $HOME/.zshrc echo -e "\n ${LCY}$ALIAS ${GRN}added to${CRS} $HOME/.zshrc" elif [ -f "$HOME/.bashrc" ] ; then + if [ "$(cat $HOME/.bashrc | grep "$ALIAS")" ] ; then + echo -e "\n ${LCY}$ALIAS ${GRN}already present in${CRS} $HOME/.bashrc" + exit + fi echo "alias $ALIAS=\"$SCRIPT_PATH/$SCRIPT_FILE_NAME\"" >> $HOME/.zshrc echo -e "\n ${LCY}$ALIAS ${GRN}added to${CRS} $HOME/.bashrc"