Alias refined

This commit is contained in:
Fr4nz D13trich 2025-12-26 22:10:11 +01:00
parent 5a0913a29a
commit a0ac02743a

View file

@ -81,7 +81,7 @@ local_check() {
### INSTALL ### INSTALL
install_helium() { install_helium() {
if [ -f "$INSTALL_PATH/$APP_NAME.AppImage" ] ; then 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 update_helium
exit exit
@ -176,10 +176,18 @@ add_alias() { ### WORKS BUT NEEDS WORK
fi fi
if [ -f "$HOME/.zshrc" ] ; then 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 "alias $ALIAS=\"$SCRIPT_PATH/$SCRIPT_FILE_NAME\"" >> $HOME/.zshrc
echo -e "\n ${LCY}$ALIAS ${GRN}added to${CRS} $HOME/.zshrc" echo -e "\n ${LCY}$ALIAS ${GRN}added to${CRS} $HOME/.zshrc"
elif [ -f "$HOME/.bashrc" ] ; then 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 "alias $ALIAS=\"$SCRIPT_PATH/$SCRIPT_FILE_NAME\"" >> $HOME/.zshrc
echo -e "\n ${LCY}$ALIAS ${GRN}added to${CRS} $HOME/.bashrc" echo -e "\n ${LCY}$ALIAS ${GRN}added to${CRS} $HOME/.bashrc"