Skip to content

Commit 551063f

Browse files
authored
Update install.sh
1 parent 0824bd8 commit 551063f

File tree

1 file changed

+25
-5
lines changed

1 file changed

+25
-5
lines changed

Diff for: install.sh

+25-5
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,31 @@ sleep 2
3535
echo
3636
echo "Adding Fastfetch to .bashrc"
3737
echo
38-
# Check if the line exists in ~/.bashrc, if not add it
39-
if ! grep -Fxq 'fastfetch' "$HOME/.bashrc"; then
40-
echo '' >> "$HOME/.bashrc"
41-
echo 'fastfetch' >> "$HOME/.bashrc"
42-
fi
38+
# Function to add fastfetch to .bashrc
39+
add_fastfetch() {
40+
if ! grep -Fxq 'fastfetch' "$HOME/.bashrc"; then
41+
echo '' >> "$HOME/.bashrc"
42+
echo 'fastfetch' >> "$HOME/.bashrc"
43+
echo "fastfetch has been added to your .bashrc and will run on Terminal launch."
44+
else
45+
echo "fastfetch is already set to run on Terminal launch."
46+
fi
47+
}
48+
49+
# Prompt the user
50+
read -p "Do you want to enable fastfetch to run on Terminal launch? (y/n): " response
51+
52+
case "$response" in
53+
[yY][eE][sS]|[yY])
54+
add_fastfetch
55+
;;
56+
[nN][oO]|[nN])
57+
echo "fastfetch will not be added to your .bashrc."
58+
;;
59+
*)
60+
echo "Invalid response. Please enter y or n."
61+
;;
62+
esac
4363
sleep 2
4464
echo
4565
echo "Applying OhMy-Posh to Bash"

0 commit comments

Comments
 (0)