minor changes

This commit is contained in:
Solomon Laing 2021-08-28 22:10:33 +09:30
parent b5ce481391
commit a5af81b784
8 changed files with 24 additions and 8 deletions

View File

@ -8,6 +8,8 @@
# Installs my customisation of dmenu # Installs my customisation of dmenu
#----------------------------------- #-----------------------------------
clear
echo "This script is going to install dmenu-inkletblot, my fork of dmenu with my custom styling. As such it will ask for root privilages." echo "This script is going to install dmenu-inkletblot, my fork of dmenu with my custom styling. As such it will ask for root privilages."
read -r -p "Are You Sure? [y/N] " input read -r -p "Are You Sure? [y/N] " input

View File

@ -1,5 +1,7 @@
#!/bin/sh #!/bin/sh
clear
default_programs="./default-programs" default_programs="./default-programs"
dependencies=$(sed -n '/DEFAULTS_START/,/DEFAULTS_END/p' $default_programs | sed -e 's/DEFAULTS_START//' -e 's/DEFAULTS_END//') dependencies=$(sed -n '/DEFAULTS_START/,/DEFAULTS_END/p' $default_programs | sed -e 's/DEFAULTS_START//' -e 's/DEFAULTS_END//')
@ -30,6 +32,7 @@ failures=()
# run though each dependency and install it if it's not already installed # run though each dependency and install it if it's not already installed
for dependency in $dependencies for dependency in $dependencies
do do
clear
if ! yay -Qi $dependency &> /dev/null; then if ! yay -Qi $dependency &> /dev/null; then
echo "Installing $dependency and it's dependencies..." echo "Installing $dependency and it's dependencies..."
yay -S --noconfirm $dependency &> /dev/null yay -S --noconfirm $dependency &> /dev/null

View File

@ -1,5 +1,7 @@
#!/bin/sh #!/bin/sh
clear
default_programs="./default-programs" default_programs="./default-programs"
dependencies=$(sed -n '/DEPENDENCIES_START/,/DEPENDENCIES_END/p' $default_programs | sed -e 's/DEPENDENCIES_START//' -e 's/DEPENDENCIES_END//') dependencies=$(sed -n '/DEPENDENCIES_START/,/DEPENDENCIES_END/p' $default_programs | sed -e 's/DEPENDENCIES_START//' -e 's/DEPENDENCIES_END//')
laptop_dependencies=$(sed -n '/DEPENDENCIES_LAPTOP_START/,/DEPENDENCIES_LAPTOP_END/p' $default_programs | sed -e 's/DEPENDENCIES_LAPTOP_START//' -e 's/DEPENDENCIES_LAPTOP_END//') laptop_dependencies=$(sed -n '/DEPENDENCIES_LAPTOP_START/,/DEPENDENCIES_LAPTOP_END/p' $default_programs | sed -e 's/DEPENDENCIES_LAPTOP_START//' -e 's/DEPENDENCIES_LAPTOP_END//')
@ -50,9 +52,10 @@ failures=()
# run though each dependency and install it if it's not already installed # run though each dependency and install it if it's not already installed
for dependency in $dependencies for dependency in $dependencies
do do
clear
if ! yay -Qi $dependency &> /dev/null; then if ! yay -Qi $dependency &> /dev/null; then
echo "Installing $dependency and it's dependencies..." echo "Installing $dependency and it's dependencies..."
yay -S --noconfirm $dependency &> /dev/null yay -S --noconfirm $dependency
fi fi
if ! yay -Qi $dependency &> /dev/null; then if ! yay -Qi $dependency &> /dev/null; then
@ -64,9 +67,10 @@ if [ $laptop -eq 1 ]; then
# run though each laptop dependency and install it if it's not already installed # run though each laptop dependency and install it if it's not already installed
for dependency in $laptop_dependencies for dependency in $laptop_dependencies
do do
clear
if ! yay -Qi $dependency &> /dev/null; then if ! yay -Qi $dependency &> /dev/null; then
echo "Installing $dependency and it's dependencies..." echo "Installing $dependency and it's dependencies..."
yay -S --noconfirm $dependency &> /dev/null yay -S --noconfirm $dependency
fi fi
if ! yay -Qi $dependency &> /dev/null; then if ! yay -Qi $dependency &> /dev/null; then

View File

@ -8,6 +8,8 @@
# Installs my customisation of dmenu # Installs my customisation of dmenu
#----------------------------------- #-----------------------------------
clear
if command -v dmenu &> /dev/null; then if command -v dmenu &> /dev/null; then
echo "dmenu is already installed on the system." echo "dmenu is already installed on the system."
exit 0 exit 0

View File

@ -1,5 +1,7 @@
#!/bin/sh #!/bin/sh
clear
default_programs="./default-programs" default_programs="./default-programs"
dependencies=$(sed -n '/MISC_START/,/MISC_END/p' $default_programs | sed -e 's/MISC_START//' -e 's/MISC_END//') dependencies=$(sed -n '/MISC_START/,/MISC_END/p' $default_programs | sed -e 's/MISC_START//' -e 's/MISC_END//')
@ -30,6 +32,7 @@ failures=()
# run though each dependency and install it if it's not already installed # run though each dependency and install it if it's not already installed
for dependency in $dependencies for dependency in $dependencies
do do
clear
if ! yay -Qi $dependency &> /dev/null; then if ! yay -Qi $dependency &> /dev/null; then
echo "Installing $dependency and it's dependencies..." echo "Installing $dependency and it's dependencies..."
yay -S --noconfirm $dependency &> /dev/null yay -S --noconfirm $dependency &> /dev/null

View File

@ -1,5 +1,7 @@
#!/bin/sh #!/bin/sh
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 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 read -r -p "Are you sure you want to continue? [y/N] " input

View File

@ -9,6 +9,8 @@
# system. # system.
#----------------------------------- #-----------------------------------
clear
if command -v yay &> /dev/null; then if command -v yay &> /dev/null; then
echo "yay is already installed on the system." echo "yay is already installed on the system."
exit 0 exit 0
@ -32,7 +34,7 @@ case $input in
esac esac
if ! command -v fakeroot &> /dev/null; then if ! command -v fakeroot &> /dev/null; then
sudo -S pacman -Sy --noconfirm base-devel sudo pacman -S --noconfirm base-devel
fi fi
cd /opt cd /opt

8
setup
View File

@ -125,11 +125,13 @@ 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."
} }
update_system
git submodule init
git submodule update
case $1 in case $1 in
"") "")
install_yay install_yay
update_system
install_dependencies install_dependencies
install_defaults install_defaults
install_misc install_misc
@ -142,7 +144,6 @@ case $1 in
install_yay install_yay
else else
install_yay install_yay
update_system
install_dependencies install_dependencies
install_defaults install_defaults
install_misc install_misc
@ -152,7 +153,6 @@ case $1 in
fi fi
;; ;;
deps) deps)
update_system
if [ "$2" = "only" ]; then if [ "$2" = "only" ]; then
install_dependencies install_dependencies
else else
@ -165,7 +165,6 @@ case $1 in
fi fi
;; ;;
defaults) defaults)
update_system
if [ "$2" = "only" ]; then if [ "$2" = "only" ]; then
install_defaults install_defaults
else else
@ -177,7 +176,6 @@ case $1 in
fi fi
;; ;;
misc) misc)
update_system
if [ "$2" = "only" ]; then if [ "$2" = "only" ]; then
install_misc install_misc
else else