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 git-flow-completion-git
dunst-git dunst-git
dmenu-inkletblot
slock slock
notify-send notify-send
visual-studio-code-bin
bitwarden-cli bitwarden-cli
jq jq
xmonad xmonad
@ -17,18 +15,13 @@ nitrogen
xclip xclip
numlockx numlockx
zenity zenity
pactl (pavucontrol) pavucontrol
nfs-utils nfs-utils
newsboat newsboat
runelite
blueman blueman
networkmanager networkmanager
network-manager-applet network-manager-applet
nextcloud-client
barrier
todoist-elecrton
guake guake
slack-desktop
xorg xorg
xorg-xinit xorg-xinit
mpv mpv
@ -38,46 +31,27 @@ rofi
thunar thunar
alacritty alacritty
wget wget
git
volumeicon volumeicon
vlc
virtualbox
virt-manager
virsh
unzip unzip
ttf-fira-code ttf-fira-code
trayer trayer
telegram-desktop
teams
steam (requires multi-lib)
qbittorrent
python python
nodejs nodejs
npm npm
nvm nvm
yay (required for many of the other packages)
openssh openssh
(for nvidia)
nvidia-settings
nvidia
nvidia-prime
numlockx numlockx
nano nano
mosh mosh
fakeroot fakeroot
ly (from git)
jre-openjdk jre-openjdk
jre-openjdk-headless jre-openjdk-headless
kdeconnect
htop htop
gnome-keyring gnome-keyring
git-flow git-flow
evince evince
dosfstools dosfstools
grub2 grub2
discord
curl curl
colorpicker-ym1234-git colorpicker-ym1234-git
cmus cmus
@ -87,3 +61,18 @@ ansible
android-sdk-platform-tools android-sdk-platform-tools
lxappearance lxappearance
qt5ct 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 #!/bin/sh
# 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
# if yay is not installed the run the install script
if ! command -v yay &> /dev/null; then
install-yay
fi
# 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" default_programs="/default-programs"
dependencies=$(cat $HOME/$default_programs) dependencies=$(cat $HOME/$default_programs)
for dependency in $dependencies for dependency in $dependencies
do do
if ! command -v $dependency &> /dev/null; then if ! command -v $dependency &> /dev/null; then
yay -Sy --noconfirm $dependency echo "Installing $dependency and it's dependencies..."
yay -S --noconfirm $dependency
fi fi
break
done done
# notify about steam issue # ask the user if they want to install nvidia dependencies, do it or skip
# 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." 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 cd /opt
sudo git clone https://aur.archlinux.org/yay.git sudo git clone https://aur.archlinux.org/yay.git
sudo chown -R $USER:users ./yay
cd yay
makepkg -si