aboutsummaryrefslogtreecommitdiff
path: root/share/trashman/spotx/unix/linux/install
blob: 2756049b15c5a62c4b37823c83820468b1cd9ab3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash

# Parameters
SHARE="$1"
REPO="https://github.com/Nuzair46/SpotX-Linux"
COMMIT="b3357f3f514351b5beea82687a1733faed4dcac4"

# Include basic functions
. $SHARE/trashman/functions || exit 1

# Requirements
trashman install spotify || exit 1

# Download
if [ ! -d "/usr/local/src/spotx" ]; then
  git clone $REPO /usr/local/src/spotx || exit 1
fi

# Use the latest version
#git -C /usr/local/src/spotx pull

# Checkout an specific version
git -C /usr/local/src/spotx remote rm origin
git -C /usr/local/src/spotx remote add origin $REPO
git -C /usr/local/src/spotx fetch origin
git -C /usr/local/src/spotx checkout $COMMIT || exit 1

# Install
bash /usr/local/src/spotx/install.sh || exit 1