completed first version of default-program installer. not moving to bin yet as it's not really something you would run frequently

This commit is contained in:
Solomon Laing 2021-04-10 19:30:37 +09:30
parent fc1b6e40f2
commit c8cedf6892
3 changed files with 97 additions and 37 deletions

View File

@ -1,10 +1,8 @@
git-flow-completion-git
dunst-git
dmenu-inkletblot
slock
notify-send
visual-studio-code-bin
bitwarden-cli
jq
xmonad
@ -17,18 +15,13 @@ nitrogen
xclip
numlockx
zenity
pactl (pavucontrol)
pavucontrol
nfs-utils
newsboat
runelite
blueman
networkmanager
network-manager-applet
nextcloud-client
barrier
todoist-elecrton
guake
slack-desktop
xorg
xorg-xinit
mpv
@ -38,46 +31,27 @@ rofi
thunar
alacritty
wget
git
volumeicon
vlc
virtualbox
virt-manager
virsh
unzip
ttf-fira-code
trayer
telegram-desktop
teams
steam (requires multi-lib)
qbittorrent
python
nodejs
npm
nvm
yay (required for many of the other packages)
openssh
(for nvidia)
nvidia-settings
nvidia
nvidia-prime
numlockx
nano
mosh
fakeroot
ly (from git)
jre-openjdk
jre-openjdk-headless
kdeconnect
htop
gnome-keyring
git-flow
evince
dosfstools
grub2
discord
curl
colorpicker-ym1234-git
cmus
@ -87,3 +61,18 @@ ansible
android-sdk-platform-tools
lxappearance
qt5ct
visual-studio-code-bin
runelite
slack-desktop
nextcloud-client
barrier
todoist-elecrton
vlc
virtualbox
virt-manager
virsh
discord
kdeconnect
telegram-desktop
teams
qbittorrent

View File

@ -1,19 +1,87 @@
#!/bin/sh
default_programs="/default-programs"
# check user is happy to run this script
echo "This script is going to install all of the programs listed in /home/<user>/default-programs and their dependencies. As such it will ask for root privilages."
read -r -p "Are you sure you want to continue? [y/N] " input
case $input in
[yY][eE][sS] | [yY])
echo "The program will continue..."
;;
[nN][oO] | [nN])
exit 0
;;
*)
echo "Invalid input..."
exit 1
;;
esac
dependencies=$(cat $HOME/$default_programs)
for dependency in $dependencies
do
if ! command -v $dependency &> /dev/null; then
yay -Sy --noconfirm $dependency
# if yay is not installed the run the install script
if ! command -v yay &> /dev/null; then
install-yay
fi
break
# check with the user they are happy to update, exit if not though.
echo "The system needs to be updated before this installation can happen. The upgrades will be applied without any user oversight which may be dangerous for out of date systems."
read -r -p "Are you sure you want to continue? [y/N] " input
case $input in
[yY][eE][sS] | [yY])
# Make sure everything is up to date
echo "Making sure everything is up to date..."
yay -Syyu --noconfirm
;;
[nN][oO] | [nN])
exit 0
;;
*)
echo "Invalid input..."
exit 1
;;
esac
# run though each default program and install it if it's not already installed
# note that yay, git, steam, dmenu-inkletblot, ly and nvidia related programs are not included
default_programs="/default-programs"
dependencies=$(cat $HOME/$default_programs)
for dependency in $dependencies
do
if ! command -v $dependency &> /dev/null; then
echo "Installing $dependency and it's dependencies..."
yay -S --noconfirm $dependency
fi
done
# notify about steam issue
# echo "There are a few programs that can't be automatically installed. The main one of these is Steam which requires multilib to be enabled. Instructions for this can be found at: https://wiki.archlinux.org/index.php/Official_repositories#Enabling_multilib Once this is done steam can be installed."
# ask the user if they want to install nvidia dependencies, do it or skip
if ! command -v yay &> /dev/null && ! command -v yay &> /dev/null && ! command -v yay &> /dev/null; then
echo "My computer requires nvidia, as such I install the required drivers and programs"
read -r -p "Are you sure you want to install? [y/N] " input
case $input in
[yY][eE][sS] | [yY])
echo "Nvidia is being installed..."
yay -S nvidia nvidia-settings nvidia-prime --noconfirm
;;
[nN][oO] | [nN])
echo "Nvidia installation has been skipped. Programs: nvidia, nvidia-settings, nvidia-prime"
;;
*)
echo "Nvidia installation has been skipped. Programs: nvidia, nvidia-settings, nvidia-prime"
;;
esac
fi
# notify about steam issue (multilib)
echo "There are a few programs that can't be automatically installed. The main one of these is Steam which requires multilib to be enabled. Instructions for this can be found at: https://wiki.archlinux.org/index.php/Official_repositories#Enabling_multilib Once this is done steam can be installed."
read -r -p "Press [ENTER] to continue.."
# notify about ly and dmenu-inkletblot scripts
echo "I use two programs that are installed from git directly: ly and dmenu-inkletblot."
echo "I do not have install scripts for both of these. They have dependencies I can't guarantee are installed."
read -r -p "Press [ENTER] to continue.."
# notify user that there may be extra steps to finish install
echo "This script has installed all of my default programs however it may not have configure many things. My dotfiles may cover some of these but things such as gnome-keyring (using the pam method) will need to be implemented. As well as setting up nvidia and xorg. There are likely more that I have forgotton as well."
read -r -p "Press [ENTER] to complete.."
# need scripts for these
# dmenu-inkletblot
# ly

View File

@ -32,3 +32,6 @@ fi
cd /opt
sudo git clone https://aur.archlinux.org/yay.git
sudo chown -R $USER:users ./yay
cd yay
makepkg -si