minor changes

This commit is contained in:
Solomon Laing 2021-08-29 14:55:37 +09:30
parent fc41134342
commit c063fbc7f2
12 changed files with 104 additions and 83 deletions

View File

@ -1,8 +1,41 @@
#!/bin/sh #!/bin/sh
#-----------------------------------
# Name: install-yay
# Version: 1.0.0
# Author: Solomon Laing
# Description:
# Installs the AUR helper yay on the
# system.
#-----------------------------------
# configure extra system things like lightdm, etc. # configure extra system things like lightdm, etc.
# also set shell to fish
# set up correct xmonad.sh e.g. if on laptop, set a copy that only has one xmobar? # set up correct xmonad.sh e.g. if on laptop, set a copy that only has one xmobar?
read -r -p "This process is not complete... [enter] " input read -r -p "This process is not complete... [enter] " input
# set shell to fish
if command -v fish &> /dev/null; then
read -r -p "You have the fish shell installed, would you like to set this as your default shell? [y/N]"
case $input in
[yY][eE][sS] | [yY])
echo "Okay, setting shell to fish."
chsh -s `which fish`
;;
[nN][oO] | [nN])
echo "Okay, not setting shell."
;;
*)
echo "Invalid input... Not setting shell."
;;
esac
fi
# notify about steam issue (multilib)
echo "Unfortunately Steam cannot be installed as [multilib] must be enabled first. Instructions for how to do this can be found at: https://wiki.archlinux.org/index.php/Official_repositories#Enabling_multilib"
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 configured many things. My dotfiles may cover some of these but things such as gnome-keyring (using the pam method), as well as setting up nvidia and xorg may need some extra attention. There are likely more that I have forgotton as well."
read -r -p "Press [ENTER] to complete.."

View File

@ -50,6 +50,7 @@ DEPENDENCIES_END
DEPENDENCIES_LAPTOP_START DEPENDENCIES_LAPTOP_START
backlight_control backlight_control
powerkit
DEPENDENCIES_LAPTOP_END DEPENDENCIES_LAPTOP_END
DEFAULTS_START DEFAULTS_START

View File

@ -1,5 +1,14 @@
#!/bin/sh #!/bin/sh
#-----------------------------------
# Name: install-yay
# Version: 1.0.0
# Author: Solomon Laing
# Description:
# Installs the AUR helper yay on the
# system.
#-----------------------------------
clear clear
default_programs="./default-programs" default_programs="./default-programs"

View File

@ -1,5 +1,14 @@
#!/bin/sh #!/bin/sh
#-----------------------------------
# Name: install-yay
# Version: 1.0.0
# Author: Solomon Laing
# Description:
# Installs the AUR helper yay on the
# system.
#-----------------------------------
clear clear
default_programs="./default-programs" default_programs="./default-programs"

View File

@ -1,5 +1,14 @@
#!/bin/sh #!/bin/sh
#-----------------------------------
# Name: install-yay
# Version: 1.0.0
# Author: Solomon Laing
# Description:
# Installs the AUR helper yay on the
# system.
#-----------------------------------
clear clear
default_programs="./default-programs" default_programs="./default-programs"

View File

@ -1,9 +1,18 @@
#!/bin/sh #!/bin/sh
#-----------------------------------
# Name: install-scripts
# Version: 1.0.0
# Author: Solomon Laing
# Description:
# Installs my scripts inks-scripts on
# the system by copying them to /usr/local/bin.
#-----------------------------------
clear clear
# check user is happy to run this script # 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." echo "This script is going to install inks-scripts to the system, which are required for much of the supporting functionality in my dotfiles and WM. As such it will ask for root privilages."
read -r -p "Are you sure you want to continue? [y/N] " input read -r -p "Are you sure you want to continue? [y/N] " input
case $input in case $input in
[yY][eE][sS] | [yY]) [yY][eE][sS] | [yY])
@ -18,72 +27,8 @@ case $input in
;; ;;
esac esac
# if yay is not installed the run the install script cd ./inks-scripts
if ! command -v yay &> /dev/null; then
./install-yay sudo cp scripts/* /usr/local/bin
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 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
# 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

@ -42,3 +42,5 @@ sudo -S git clone https://aur.archlinux.org/yay.git
sudo -S chown -R $USER:users ./yay sudo -S chown -R $USER:users ./yay
cd yay cd yay
makepkg -si makepkg -si
exit 0

21
setup
View File

@ -109,6 +109,15 @@ function install_config {
fi fi
} }
# attempt to configure system
function configure_system {
cd $working_dir
./configure-system
if [ $? -eq 1 ]; then
exit 1
fi
}
function help { function help {
echo "Usage is:" echo "Usage is:"
echo " setup <option> -- to start system setup from option" echo " setup <option> -- to start system setup from option"
@ -120,7 +129,8 @@ echo " defaults : Install my chosen default programs"
echo " misc : Install my collection of misc - nice to have - programs" echo " misc : Install my collection of misc - nice to have - programs"
echo " scripts : Install my scirpts" echo " scripts : Install my scirpts"
echo " dmenu : Install my customised version of dmenu" echo " dmenu : Install my customised version of dmenu"
echo " config : Install my dotfiles to the system" echo " dotfiles : Install my dotfiles to the system"
echo " configure : configure certain system files - BETA"
echo "" echo ""
echo "Note: it is expected that the initial run of this script lets each stage complete sucessfully." echo "Note: it is expected that the initial run of this script lets each stage complete sucessfully."
} }
@ -207,13 +217,20 @@ case $1 in
install_config install_config
fi fi
;; ;;
config) dotfiles)
if [ "$2" = "only" ]; then if [ "$2" = "only" ]; then
install_config install_config
else else
install_config install_config
fi fi
;; ;;
configure)
if [ "$2" = "only" ]; then
configure_system
else
configure_system
fi
;;
*) *)
echo "Invalid input..." echo "Invalid input..."
help help

View File

@ -11,10 +11,8 @@
# check we aren't root # check we aren't root
if [ $(whoami) == "root" ]; then if [ $(whoami) == "root" ]; then
echo "These scripts should not be run as root, please log into a user account." echo "These scripts should not be run as root, please log into a user account."
exit 1 exit 1
fi fi
# check sudo is installed and user is in sudo or wheel group # check sudo is installed and user is in sudo or wheel group
@ -47,5 +45,3 @@ if [ $connectivity -ne 0 ]; then
echo "Please set up an active internet conncetion and try again." echo "Please set up an active internet conncetion and try again."
exit 1 exit 1
fi fi