Skip to content

Commit

Permalink
Auto determine architecture
Browse files Browse the repository at this point in the history
  • Loading branch information
rapejim committed Jun 10, 2024
1 parent caf3654 commit 48351d2
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions root/plexdrive-install.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
#!/bin/sh
# Plexdrive updater
# Plexdrive installer

# Determine architecture
ARCH=$(dpkg --print-architecture)
# Validate architecture
if [ "$ARCH" != "amd64" ] && [ "$ARCH" != "arm64" ]; then
echo "Arquitectura no soportada: $ARCH. El script solo soporta amd64 y arm64."
exit 1
fi

# Get plexdrive
cd /tmp
wget "https://github.com/plexdrive/plexdrive/releases/download/$PLEXDRIVE_VERSION/plexdrive-linux-$ARCH" -q -O plexdrive
echo "Downloading https://github.com/plexdrive/plexdrive/releases/download/$PLEXDRIVE_VERSION/plexdrive-linux-$ARCH"
wget "https://github.com/plexdrive/plexdrive/releases/download/$PLEXDRIVE_VERSION/plexdrive-linux-$ARCH" --no-verbose -O plexdrive
chmod -c +x /tmp/plexdrive
version=$(/tmp/plexdrive --version)

# Install plexdrive
echo "Installing Plexdrive v. ${version}"
#install plexdrive
mv -v /tmp/plexdrive /usr/local/bin/
chown -c root:root /usr/local/bin/plexdrive

0 comments on commit 48351d2

Please sign in to comment.