From b86827411cad1e9af63f53d35c4ae66480d86b9b Mon Sep 17 00:00:00 2001 From: Andrii Dokhniak Date: Sun, 28 Jul 2024 17:32:05 +0200 Subject: [PATCH] Updated the scripts to source the dependencies --- src/commands/dotfiles/alacritty-setup.sh | 2 ++ src/commands/dotfiles/kitty-setup.sh | 2 ++ src/commands/dotfiles/rofi-setup.sh | 2 ++ src/commands/system-setup/1-compile-setup.sh | 2 ++ src/commands/system-setup/2-gaming-setup.sh | 2 ++ src/commands/system-setup/3-global-theme.sh | 4 +++- src/commands/system-update.sh | 2 ++ src/commands/test/lib.sh | 5 +++++ src/commands/test/main.sh | 6 ++++++ 9 files changed, 26 insertions(+), 1 deletion(-) create mode 100755 src/commands/test/lib.sh create mode 100755 src/commands/test/main.sh diff --git a/src/commands/dotfiles/alacritty-setup.sh b/src/commands/dotfiles/alacritty-setup.sh index 2b363e85..46143729 100755 --- a/src/commands/dotfiles/alacritty-setup.sh +++ b/src/commands/dotfiles/alacritty-setup.sh @@ -1,5 +1,7 @@ #!/bin/sh -e +. ./common-script.sh + setupAlacritty() { echo "Install Alacritty if not already installed..." if ! command_exists alacritty; then diff --git a/src/commands/dotfiles/kitty-setup.sh b/src/commands/dotfiles/kitty-setup.sh index bad29ac0..b2bce9ea 100755 --- a/src/commands/dotfiles/kitty-setup.sh +++ b/src/commands/dotfiles/kitty-setup.sh @@ -1,5 +1,7 @@ #!/bin/sh -e +. ./common-script.sh + setupKitty() { echo "Install Kitty if not already installed..." if ! command_exists kitty; then diff --git a/src/commands/dotfiles/rofi-setup.sh b/src/commands/dotfiles/rofi-setup.sh index ea2be0f2..a6639bb9 100755 --- a/src/commands/dotfiles/rofi-setup.sh +++ b/src/commands/dotfiles/rofi-setup.sh @@ -1,5 +1,7 @@ #!/bin/sh -e +. ./common-script.sh + setupRofi() { echo "Install Rofi if not already installed..." if ! command_exists rofi; then diff --git a/src/commands/system-setup/1-compile-setup.sh b/src/commands/system-setup/1-compile-setup.sh index 345f09c8..8f96aa8f 100755 --- a/src/commands/system-setup/1-compile-setup.sh +++ b/src/commands/system-setup/1-compile-setup.sh @@ -1,5 +1,7 @@ #!/bin/sh -e +. ./common-script.sh + # Check if the home directory and linuxtoolbox folder exist, create them if they don't LINUXTOOLBOXDIR="$HOME/linuxtoolbox" diff --git a/src/commands/system-setup/2-gaming-setup.sh b/src/commands/system-setup/2-gaming-setup.sh index 1d903105..96bfe777 100755 --- a/src/commands/system-setup/2-gaming-setup.sh +++ b/src/commands/system-setup/2-gaming-setup.sh @@ -1,5 +1,7 @@ #!/bin/sh -e +. ./common-script.sh + installDepend() { ## Check for dependencies. echo -e "${YELLOW}Installing dependencies...${RC}" diff --git a/src/commands/system-setup/3-global-theme.sh b/src/commands/system-setup/3-global-theme.sh index a1ad4824..eaebcd6e 100644 --- a/src/commands/system-setup/3-global-theme.sh +++ b/src/commands/system-setup/3-global-theme.sh @@ -1,5 +1,7 @@ #!/bin/sh -e +. ./common-script.sh + # Check if the home directory and linuxtoolbox folder exist, create them if they don't LINUXTOOLBOXDIR="$HOME/linuxtoolbox" @@ -71,4 +73,4 @@ EOF checkEnv install_theme_tools configure_qt6ct -configure_kvantum \ No newline at end of file +configure_kvantum diff --git a/src/commands/system-update.sh b/src/commands/system-update.sh index b86172b8..78393f70 100755 --- a/src/commands/system-update.sh +++ b/src/commands/system-update.sh @@ -1,5 +1,7 @@ #!/bin/sh -e +. ./common-script.sh + fastUpdate() { case ${PACKAGER} in pacman) diff --git a/src/commands/test/lib.sh b/src/commands/test/lib.sh new file mode 100755 index 00000000..45e08b7a --- /dev/null +++ b/src/commands/test/lib.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +say_hello () { + echo Hi +} diff --git a/src/commands/test/main.sh b/src/commands/test/main.sh new file mode 100755 index 00000000..7af16b96 --- /dev/null +++ b/src/commands/test/main.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +# The current working directory will always be inside "commands" +. test/lib.sh + +say_hello