Skip to content

Commit

Permalink
only emit borg info if not installed
Browse files Browse the repository at this point in the history
  • Loading branch information
luludotdev committed Mar 11, 2024
1 parent 3723d39 commit 93445cd
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,25 @@
install_dir="${BACKUP_INSTALL_DIR:-/usr/local/bin}"
script_name="${BACKUP_SCRIPT_NAME:-backup}"

# Install Deno
# deno
if command -v deno >/dev/null; then
echo "" > /dev/null
else
curl -fsSL https://deno.land/install.sh | DENO_INSTALL="/usr/local" sh
fi

# Install borg
if command -v borg >/dev/null; then
echo "" > /dev/null
else
# TODO: Install borg
echo "" > /dev/null
fi

# Install script
# script
script_path="$install_dir/$script_name"
wget -q -O $script_path https://raw.githubusercontent.com/luludotdev/backup/master/backup.ts
chmod +x $script_path

echo "backup script installed to $script_path"
echo "make sure to install borg"
echo "https://borgbackup.readthedocs.io/en/stable/installation.html"

# borg
if command -v borg >/dev/null; then
echo "" > /dev/null
else
# TODO: Install borg automatically
echo "make sure to install borg"
echo "https://borgbackup.readthedocs.io/en/stable/installation.html"
fi

0 comments on commit 93445cd

Please sign in to comment.