added snap
This commit is contained in:
parent
5aacf37d8a
commit
34751cd409
3 changed files with 50 additions and 3 deletions
1
Scripts/.extra/snap_apps.lst
Normal file
1
Scripts/.extra/snap_apps.lst
Normal file
|
@ -0,0 +1 @@
|
|||
btop
|
|
@ -2,4 +2,6 @@ timeout 3
|
|||
|
||||
use_nvram false
|
||||
|
||||
dont_scan_files grubx64.efi bootx64.efi
|
||||
|
||||
include themes/catppuccin/mocha.conf
|
|
@ -1,5 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
scrDir=$(dirname "$(realpath "$0")")
|
||||
|
||||
REFINDCONF="/boot/efi/EFI/refind/refind.conf"
|
||||
|
||||
|
@ -29,7 +30,6 @@ install_theme(){
|
|||
|
||||
|
||||
install_snap(){
|
||||
echo "Installing dependencies..."
|
||||
|
||||
echo "Cloning Snapd AUR package..."
|
||||
git clone https://aur.archlinux.org/snapd.git
|
||||
|
@ -65,6 +65,41 @@ install_snap(){
|
|||
|
||||
echo "Snap installation complete!"
|
||||
|
||||
}
|
||||
|
||||
install_snap_apps(){
|
||||
# Set the path to the snap_apps.lst file
|
||||
SNAP_APPS_FILE=".extra/snap_apps.lst"
|
||||
|
||||
# Check if the file exists
|
||||
if [ ! -f "$SNAP_APPS_FILE" ]; then
|
||||
echo "File $SNAP_APPS_FILE not found!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Read each line in the "snap_apps.lst" file
|
||||
while IFS= read -r line
|
||||
do
|
||||
# Skip empty lines and lines starting with '#'
|
||||
if [ -z "$line" ] || [[ "$line" == \#* ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
# Install the snap package
|
||||
echo "Installing snap package: $line"
|
||||
sudo snap install "$line"
|
||||
|
||||
# Check if the installation was successful
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "$line installed successfully!"
|
||||
else
|
||||
echo "Failed to install $line"
|
||||
fi
|
||||
done < "$SNAP_APPS_FILE"
|
||||
|
||||
echo "All snap packages have been processed."
|
||||
|
||||
|
||||
}
|
||||
|
||||
# Check with sudo
|
||||
|
@ -76,7 +111,16 @@ else
|
|||
install_theme
|
||||
fi
|
||||
|
||||
install_snap
|
||||
|
||||
|
||||
read -p "Do you want to install Snap? (y/n): " answer
|
||||
|
||||
# Handle user input
|
||||
if [[ "$answer" =~ ^[Yy]$ ]]; then
|
||||
# Install Snapd
|
||||
install_snapd
|
||||
|
||||
# Install Snap packages
|
||||
install_snap_apps
|
||||
else
|
||||
echo "Snap installation skipped"
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue