Skip to content

Commit

Permalink
Update install.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkXero-dev authored Jul 10, 2024
1 parent 0824bd8 commit 551063f
Showing 1 changed file with 25 additions and 5 deletions.
30 changes: 25 additions & 5 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,31 @@ sleep 2
echo
echo "Adding Fastfetch to .bashrc"
echo
# Check if the line exists in ~/.bashrc, if not add it
if ! grep -Fxq 'fastfetch' "$HOME/.bashrc"; then
echo '' >> "$HOME/.bashrc"
echo 'fastfetch' >> "$HOME/.bashrc"
fi
# Function to add fastfetch to .bashrc
add_fastfetch() {
if ! grep -Fxq 'fastfetch' "$HOME/.bashrc"; then
echo '' >> "$HOME/.bashrc"
echo 'fastfetch' >> "$HOME/.bashrc"
echo "fastfetch has been added to your .bashrc and will run on Terminal launch."
else
echo "fastfetch is already set to run on Terminal launch."
fi
}

# Prompt the user
read -p "Do you want to enable fastfetch to run on Terminal launch? (y/n): " response

case "$response" in
[yY][eE][sS]|[yY])
add_fastfetch
;;
[nN][oO]|[nN])
echo "fastfetch will not be added to your .bashrc."
;;
*)
echo "Invalid response. Please enter y or n."
;;
esac
sleep 2
echo
echo "Applying OhMy-Posh to Bash"
Expand Down

0 comments on commit 551063f

Please sign in to comment.