1
Fork 0
mirror of https://github.com/Steffo99/config-fish.git synced 2024-12-22 14:54:23 +00:00
This commit is contained in:
Steffo 2021-07-15 13:04:23 +02:00
parent d3d9b34917
commit b2bc723b82
Signed by: steffo
GPG key ID: 6965406171929D01

View file

@ -24,20 +24,18 @@ function update_peertube
echo_progress "Backup path will be: "
echo_highlight "$BACKUP_PATH" \n
if not test -d "$BACKUP_DIR"
echo_progress "Creating backup dir..." \n
mkdir -p backup
end
echo_progress "Dumping the database to the backup dir..."
pg_dump -F custom "peertube_prod" > "$BACKUP_PATH"
set -g LATEST (curl -s https://api.github.com/repos/chocobozzz/peertube/releases/latest | grep tag_name | cut -d '"' -f 4)
echo_progress "Updating to Peertube "
echo_highlight "$LATEST" \n
confirm
echo_progress "Creating backup dir..." \n
mkdir -p "$BACKUP_DIR"
echo_progress "Dumping the database to the backup dir..."
pg_dump -F custom "peertube_prod" > "$BACKUP_PATH"
set -g VERSIONS_DIR "$INSTALL_DIR/versions"
echo_progress "Versions dir is: "
echo_highlight "$VERSIONS_DIR" \n