diff --git a/std-tools.sh b/std-tools.sh index 41a36fc..5731746 100644 --- a/std-tools.sh +++ b/std-tools.sh @@ -16,3 +16,20 @@ rm lazydocker_${RELEASE}_Linux_x86_64.tar.gz cp ./lazydocker /usr/bin rm ./lazydocker ./LICENSE ./README.md echo "LazyDocker installed successfully." + +RELEASE=$(wget -q https://github.com/ajeetdsouza/zoxide/releases/latest -O - | grep "title>Release" | cut -d " " -f 4 | sed 's/^v//') +wget -q https://github.com/ajeetdsouza/zoxide/releases/download/v$RELEASE/zoxide-$RELEASE-x86_64-unknown-linux-musl.tar.gz -O zoxide.tar.gz +tar -xzf zoxide.tar.gz zoxide +rm zoxide.tar.gz +cp ./zoxide /usr/bin +rm ./zoxide +echo "Zoxide installed successfully." +if ! grep -q 'zoxide init bash' ~/.bashrc; then + echo -e '\n# Initialize zoxide' >> ~/.bashrc + echo 'eval "$(zoxide init bash)"' >> ~/.bashrc + echo "Zoxide setup added to ~/.bashrc." +else + echo "Zoxide is already configured in ~/.bashrc." +fi + +echo "All tools installed! Please run 'source ~/.bashrc' or restart your terminal to start using zoxide."