Skip to content
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