mirror of
https://github.com/phaleixo/after_install_debian_12.git
synced 2025-12-05 21:49:44 -03:00
modified: src/shell_scripts/install_extensions.sh
This commit is contained in:
parent
7b97d30104
commit
8c3ff56a33
@ -9,43 +9,43 @@ echo "https://github.com/phaleixo/after_install_debian_12"
|
||||
|
||||
### Confirm script execution
|
||||
read -p "Do you want to proceed? (y/n): " response
|
||||
[[ "$response" != "y" ]] && inform "Operation canceled by the user." && exit 0
|
||||
[[ "$response" != "y" ]] && echo "Operation canceled by the user." && exit 0
|
||||
|
||||
### check if the distribution is compatible
|
||||
if [[ $(lsb_release -cs) = "bookworm" ]]
|
||||
then
|
||||
echo ""
|
||||
echo -e "\e[32;1mDebian 12 Distribution.\e[m"
|
||||
echo ""
|
||||
### Check if the distribution is compatible
|
||||
if [[ $(lsb_release -cs) = "bookworm" ]]; then
|
||||
echo -e "\n\e[32;1mDebian 12 Distribution.\e[m"
|
||||
echo "Continuing with the script..."
|
||||
echo ""
|
||||
else
|
||||
echo -e "\e[31;1mDistribution not approved for use with this script.\e[m"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
### check if there is an internet connection.
|
||||
if ping -q -c 3 -W 1 1.1.1.1 >/dev/null;
|
||||
then
|
||||
echo ""
|
||||
echo -e "\e[32;1mInternet connection OK.\e[m"
|
||||
echo ""
|
||||
### Check for internet connection
|
||||
if ping -q -c 3 -W 1 1.1.1.1 >/dev/null; then
|
||||
echo -e "\n\e[32;1mInternet connection OK.\e[m"
|
||||
echo "Continuing with the script..."
|
||||
echo ""
|
||||
else
|
||||
echo -e "\e[31;1mYou are not connected to the internet. Check your network or Wi-Fi connection before proceeding.\e[m"
|
||||
echo -e "\e[31;1mYou are not connected to the internet. Check your network or Wi-Fi connection before proceeding.\e[m"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
### Install Extensions
|
||||
### Check if the desktop environment is GNOME
|
||||
desktop_env=$(echo "$XDG_CURRENT_DESKTOP" | tr '[:upper:]' '[:lower:]')
|
||||
|
||||
if [[ "$desktop_env" != *gnome* ]]; then
|
||||
echo -e "\e[31;1mThis script is intended for GNOME. Detected desktop: $XDG_CURRENT_DESKTOP\e[m"
|
||||
exit 1
|
||||
else
|
||||
echo -e "\e[32;1mDetected GNOME environment.\e[m"
|
||||
fi
|
||||
|
||||
### Install Extensions
|
||||
extension=(
|
||||
gnome-shell-extension-dashtodock
|
||||
gnome-shell-extension-appindicator
|
||||
gnome-shell-extension-expresso
|
||||
gnome-shell-extension-tilling-assistant
|
||||
gnome-shell-extension-desktop-icons-ng
|
||||
|
||||
)
|
||||
|
||||
for extension_name in "${extension[@]}"; do
|
||||
@ -55,7 +55,7 @@ for extension_name in "${extension[@]}"; do
|
||||
echo "[installed] - $extension_name"
|
||||
fi
|
||||
done
|
||||
echo -e "Extensions instaled"
|
||||
|
||||
echo -e "\n\e[32;1mExtensions installed.\e[m"
|
||||
|
||||
exit 0
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user