Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nvm: track latest #26

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion jellyseerr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,20 @@ mkdir -p $HOME/.logs/
touch $HOME/.logs/jellyseerr.log
export log="$HOME/.logs/jellyseerr.log"

function github_latest_version() {
# Function by Liara
# Argument expects the author/repo format
# e.g. swizzin/swizzin
repo=$1
curl -fsSLI -o /dev/null -w %{url_effective} https://github.com/${repo}/releases/latest | grep -o '[^/]*$'
}

function _deps() {
## Function for installing nvm.
if [[ ! -d "$HOME/.nvm" ]]; then
echo "Installing node"
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash >> "$log" 2>&1
nvmVersion=$(github_latest_version "nvm-sh/nvm")
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/${nvmVersion}/install.sh | bash >> "$log" 2>&1
echo "nvm installed."
else
echo "nvm is already installed."
Expand Down
11 changes: 10 additions & 1 deletion lounge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,20 @@ mkdir -p $HOME/.logs/
touch "$HOME/.logs/lounge.log"
log="$HOME/.logs/lounge.log"

function github_latest_version() {
# Function by Liara
# Argument expects the author/repo format
# e.g. swizzin/swizzin
repo=$1
curl -fsSLI -o /dev/null -w %{url_effective} https://github.com/${repo}/releases/latest | grep -o '[^/]*$'
}

function _deps() {
## Function for installing nvm.
if [[ ! -d $HOME/.nvm ]]; then
echo "Installing node"
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash >> "$log" 2>&1
nvmVersion=$(github_latest_version "nvm-sh/nvm")
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/${nvmVersion}/install.sh | bash >> "$log" 2>&1
echo "nvm installed."
else
echo "nvm is already installed."
Expand Down
3 changes: 2 additions & 1 deletion race-ready.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ function _nvm() {
## Function for installing nvm.
if [[ ! -d /home/$user/.nvm ]]; then
echo "Installing node"
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash >> "$log" 2>&1
nvmVersion=$(github_latest_version "nvm-sh/nvm")
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/${nvmVersion}/install.sh | bash >> "$log" 2>&1
echo "nvm installed."
else
echo "nvm is already installed."
Expand Down