minor changes

This commit is contained in:
Solomon Laing 2021-08-28 22:03:14 +09:30
parent 9a27fcf00e
commit b5ce481391
2 changed files with 20 additions and 33 deletions

View File

@ -9,7 +9,7 @@
# system. # system.
#----------------------------------- #-----------------------------------
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
fi fi

51
setup
View File

@ -21,14 +21,18 @@ working_dir=$(pwd)
function install_yay { function install_yay {
cd $working_dir cd $working_dir
./install-yay ./install-yay
if [ $? -eq 1 ]; then
exit 1
fi
} }
# install my dmenu # install my dmenu
function install_dmenu { function install_dmenu {
cd $working_dir cd $working_dir
git submodule init
git submodule update
./install-dmenu-inkletblot ./install-dmenu-inkletblot
if [ $? -eq 1 ]; then
exit 1
fi
} }
# update the system # update the system
@ -54,55 +58,55 @@ function update_system {
# install all required dependencies/programs # install all required dependencies/programs
function install_dependencies { function install_dependencies {
cd $working_dir
./install-dependencies
if [ $? -eq 1 ]; then if [ $? -eq 1 ]; then
exit 1 exit 1
fi fi
cd $working_dir
./install-dependencies
} }
# install all default programs # install all default programs
function install_defaults { function install_defaults {
cd $working_dir
./install-defaults
if [ $? -eq 1 ]; then if [ $? -eq 1 ]; then
exit 1 exit 1
fi fi
cd $working_dir
./install-defaults
} }
# install all misc programs # install all misc programs
function install_misc { function install_misc {
cd $working_dir
./istall-misc
if [ $? -eq 1 ]; then if [ $? -eq 1 ]; then
exit 1 exit 1
fi fi
cd $working_dir
./istall-misc
} }
# install my scripts # install my scripts
function install_scripts { function install_scripts {
cd $working_dir
./install-scripts
if [ $? -eq 1 ]; then if [ $? -eq 1 ]; then
exit 1 exit 1
fi fi
cd $working_dir
./install-scripts
} }
function install_dmenu { function install_dmenu {
cd $working_dir
./install-dmenu-inkletblot
if [ $? -eq 1 ]; then if [ $? -eq 1 ]; then
exit 1 exit 1
fi fi
cd $working_dir
./install-dmenu-inkletblot
} }
# install my config # install my config
function install_config { function install_config {
cd $working_dir
./install-config
if [ $? -eq 1 ]; then if [ $? -eq 1 ]; then
exit 1 exit 1
fi fi
cd $working_dir
./install-config
} }
function help { function help {
@ -111,12 +115,11 @@ echo " setup <option> -- to start system setup from option"
echo " setup <option> only -- to only setup the specified option" echo " setup <option> only -- to only setup the specified option"
echo "Options (in order of execution):" echo "Options (in order of execution):"
echo " yay : Install yay AUR helper" echo " yay : Install yay AUR helper"
echo " dmenu : Install my customised version of dmenu"
echo " deps : Install the dependencies for my scripts and window manager" echo " deps : Install the dependencies for my scripts and window manager"
echo " defaults : Install my chosen default programs" 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 customisation of dmenu" echo " dmenu : Install my customised version of dmenu"
echo " config : Install my dotfiles to the system" echo " config : Install my dotfiles to the system"
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."
@ -126,7 +129,6 @@ echo "Note: it is expected that the initial run of this script lets each stage c
case $1 in case $1 in
"") "")
install_yay install_yay
install_dmenu
update_system update_system
install_dependencies install_dependencies
install_defaults install_defaults
@ -140,21 +142,6 @@ case $1 in
install_yay install_yay
else else
install_yay install_yay
install_dmenu
update_system
install_dependencies
install_defaults
install_misc
install_scripts
install_dmenu
install_config
fi
;;
dmenu)
if [ "$2" = "only" ]; then
install_dmenu
else
install_dmenu
update_system update_system
install_dependencies install_dependencies
install_defaults install_defaults