diff --git a/swww.sh b/swww.sh index 47138f7..d5bec4b 100644 --- a/swww.sh +++ b/swww.sh @@ -34,24 +34,6 @@ fi } - checkBuildDependencies() { - echo_pkg deps "Installing build dependencies.." - local deps=(git xdg-output liblz4-dev wayland-protocols) - # echo "DEBUG: Installing ${deps[@]}" - check-and-install ${deps[@]} - - if ! command_exists cargo; then - pen bold yellow "Installing cargo.." - curl --proto '=https' --tlsv1.2 -sSf "https://sh.rustup.rs" | sh - - sleep 2 - - . "$HOME/.cargo/env" - else - return 0 - fi - } - check-cargo() { if command_exists cargo; then return 0 @@ -70,6 +52,24 @@ fi } + checkBuildDependencies() { + echo_pkg deps "Installing build dependencies.." + local deps=(git xdg-output liblz4-dev wayland-protocols) + # echo "DEBUG: Installing ${deps[@]}" + check-and-install ${deps[@]} + + if ! check-cargo; then + pen bold yellow "Installing cargo.." + curl --proto '=https' --tlsv1.2 -sSf "https://sh.rustup.rs" | sh + + sleep 2 + + . "$HOME/.cargo/env" + else + return 0 + fi + } + cloneAndBuildSwww() { local err out local cloneDir="$(mktemp -d)"