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

update install script #24

Merged
merged 2 commits into from
Oct 25, 2024
Merged
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
19 changes: 10 additions & 9 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
#!/bin/sh -e
#!/bin/sh -eu

################################################################################
# Description: install the latest version of pixel-backup to the local directory
# Author: Vivek Revankar <[email protected]>
# Usage: sh -c "$(curl -fSs https://raw.githubusercontent.com/master-hax/pixel-backup-gang/master/install.sh)"
################################################################################

pbg_tarball_url="https://github.com/master-hax/pixel-backup-gang/releases/download/0.0.2/pixel-backup-gang-0.0.2.tar.gz"
pbg_tarball_filename="pixel-backup-gang-latest.tar.gz"
echo "install.sh: downloading the latest release"
curl -fL $pbg_tarball_url --output $pbg_tarball_filename
echo "install.sh: unpacking the release archive (requires root)"
/sbin/su --command "tar -xvf $pbg_tarball_filename"
echo "install.sh: make the release executable (requires root)"
/sbin/su --command "chmod +x ./pixel-backup-gang/*.sh"
pbg_tarball_version="0.0.2"
pbg_tarball_filename="pixel-backup-gang-$pbg_tarball_version.tar.gz"
pbg_tarball_url="https://github.com/master-hax/pixel-backup-gang/releases/download/$pbg_tarball_version/$pbg_tarball_filename"
echo "install.sh: downloading version $pbg_tarball_version from github"
curl -fL $pbg_tarball_url --output $pbg_tarball_filename || { echo 'failed to download release archive' ; exit 1; }
echo "install.sh: unpacking the release archive (requires root)" || { echo 'failed to unpack release archive' ; exit 1; }
su --command "tar -xvf $pbg_tarball_filename" || { echo 'failed to inflate release archive' ; exit 1; }
echo "install.sh: making the release executable (requires root)"
su --command "chmod +x ./pixel-backup-gang/*.sh" || { echo 'failed to make scripts executable' ; exit 1; }
echo "install.sh: pixel backup gang successfully installed to $(realpath ./pixel-backup-gang)"