mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
Add system package manager checks and installations***
This commit is contained in:
@@ -1,5 +1,33 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Check if this is debian based
|
||||
|
||||
# Check if system supports apt-get
|
||||
|
||||
if -x "$(command -v apt-get)" ]; then
|
||||
# Update apt-get
|
||||
sudo apt-get update
|
||||
# Install build-essential
|
||||
sudo apt-get install build-essential -y
|
||||
fi
|
||||
|
||||
# Check if system supports yum
|
||||
if -x "$(command -v yum)" ]; then
|
||||
# Update yum
|
||||
sudo yum update
|
||||
# Install build-essential
|
||||
sudo yum install gcc-c++ make -y
|
||||
fi
|
||||
|
||||
# Check if system supports apk
|
||||
if -x "$(command -v apk)" ]; then
|
||||
# Update apk
|
||||
sudo apk update
|
||||
# Install build-essential
|
||||
sudo apk add build-base
|
||||
fi
|
||||
|
||||
|
||||
# Install NVM
|
||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
|
||||
|
||||
@@ -8,6 +36,7 @@ export NVM_DIR="$HOME/.nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||
|
||||
|
||||
# Refresh bash
|
||||
source ~/.bashrc
|
||||
|
||||
|
||||
Reference in New Issue
Block a user