#!/bin/bash URL=https://github.com/ruslan-ohitin/xenserver-scripts/archive/master.zip # Get directory where this script is # https://stackoverflow.com/questions/59895/get-the-source-directory-of-a-bash-script-from-within-the-script-itself DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" cd $DIR wget --no-verbose -O new_version.zip $URL if unzip -q -j -o new_version.zip then echo "new_version.zip unzipped" else echo "Error while unzipping new_version.zip" fi chmod +x host-backup sms_sms.ru update vm-backup nc-send-group nc-receive-group copy-backups weekly-vm-backup rm -f new_version.zip