Compare commits

...

3 Commits

Author SHA1 Message Date
781f2ef7a2 Added the install_marksman
Signed-off-by: Marcin Woźniak <marcin.wozniak@wundermanthompson.com>
2023-09-04 11:11:22 +02:00
72f5e481a4 Changing the update_pip
Signed-off-by: Marcin Woźniak <marcin.wozniak@wundermanthompson.com>
2023-09-04 11:10:54 +02:00
de865b3ea7 Added the PIPEXT to not coping the code
Signed-off-by: Marcin Woźniak <marcin.wozniak@wundermanthompson.com>
2023-09-04 11:10:26 +02:00

View File

@ -9,6 +9,14 @@ RED='\033[0;31m'
GREEN='\033[0;0;32m' GREEN='\033[0;0;32m'
NC='\033[0m' NC='\033[0m'
PIPEXT="--user --force --quiet"
PIPEXTPRE="--pre $PIPEXT"
if [[ "$(uname -r)" =~ "gentoo" || "$(uname -r)" =~ "WSL2" ]]; then
PIPEXT="$PIPEXT --break-system-packages"
PIPEXTPRE="$PIPEXTPRE --break-system-packages"
fi
function timestamp() { function timestamp() {
echo -e "${GREEN}[+]${NC} $(date +'%F %T') [INFO] $*" echo -e "${GREEN}[+]${NC} $(date +'%F %T') [INFO] $*"
} }
@ -28,12 +36,16 @@ function command_start() {
function update_pip() { function update_pip() {
# Update the pip # Update the pip
if [[ "$(uname)" == "Darwin" ]]; then
python3 -m pip install --upgrade pip --user python3 -m pip install --upgrade pip --user
elif [[ "$(uname -r)" =~ "gentoo" ]]; then
sudo emerge dev-python/pip
fi
} }
function install_neovim_module_for_python() { function install_neovim_module_for_python() {
# Python module in neovim # Python module in neovim
pip3 install neovim --pre --user --force --quiet pip3 install neovim $PIPEXTPRE
} }
function install_pyright() { function install_pyright() {
@ -100,6 +112,16 @@ function install_shellcheck() {
fi fi
} }
function install_marksman() {
if [[ "$(uname)" == "Darwin" ]]; then
brew install marksman -q
else
wget https://github.com/artempyanykh/marksman/releases/latest/download/marksman-linux-x64 -O $HOME/.local/bin/marksman
chmod +x $HOME/.local/bin/marksman
fi
}
function install_go() { function install_go() {
# Install the golang # Install the golang
if [[ "$(uname)" == "Darwin" ]]; then if [[ "$(uname)" == "Darwin" ]]; then
@ -116,13 +138,13 @@ function install_gopls() {
function install_black() { function install_black() {
# Install black # Install black
pip3 install black --pre --user --force --quiet pip3 install black $PIPEXTPRE
} }
function install_ansible() { function install_ansible() {
# Install Ansible # Install Ansible
pip3 install ansible ansible-lint ansible-core --pre --user --force --quiet pip3 install ansible ansible-lint ansible-core $PIPEXTPRE
pip3 install ansible-parallel --pre --user --force --quiet pip3 install ansible-parallel $PIPEXTPRE
} }
function install_ansible-language-server() { function install_ansible-language-server() {
@ -134,27 +156,27 @@ function install_ansible-language-server() {
function install_meraki_ansible() { function install_meraki_ansible() {
# Install python, ansible module for meraki # Install python, ansible module for meraki
ansible-galaxy collection install cisco.meraki --force ansible-galaxy collection install cisco.meraki --force
pip3 install meraki --user --force --quiet pip3 install meraki $PIPEXT
} }
function install_azure_cli() { function install_azure_cli() {
# Install azure_cli # Install azure_cli
pip3 install azure-cli --pre --user --force --quiet pip3 install azure-cli $PIPEXTPRE
} }
function install_awscli() { function install_awscli() {
# Install awscli # Install awscli
pip3 install awscli --pre --user --force --quiet pip3 install awscli $PIPEXTPRE
} }
function install_ytdlp() { function install_ytdlp() {
# Install yt-dlp # Install yt-dlp
pip3 install yt-dlp --pre --user --force --quiet pip3 install yt-dlp $PIPEXTPRE
} }
function install_spotifydl() { function install_spotifydl() {
# Install spotify_dl # Install spotify_dl
pip3 install spotify_dl --pre --user --force --quiet pip3 install spotify_dl $PIPEXTPRE
} }
function update() { function update() {
@ -202,12 +224,14 @@ function update() {
function main() { function main() {
command_start update_pip command_start update_pip
command_start install_neovim_module_for_python
command_start install_go command_start install_go
command_start install_pyright command_start install_pyright
command_start install_lazy command_start install_lazy
command_start install_bash-language-server command_start install_bash-language-server
command_start install_yaml-language-server command_start install_yaml-language-server
command_start install_ansible-language-server command_start install_ansible-language-server
command_start install_marksman
command_start install_shfmt command_start install_shfmt
command_start install_shellcheck command_start install_shellcheck
command_start install_gopls command_start install_gopls