#!/usr/bin/env bash ######################################################################## # Copyright 2014 Lukas Bestle # License MIT ######################################################################## # Prepares a site for deployment and sets the origin repository and # branch the site is connected to. # # Usage: site_origin [] # # Name of the site (directory in ~/web/sites/) # Repository URL and branch name ([#]) # If omitted, the origin gets deleted. # If the string does not contain a "#", the branch is # set to "master". ######################################################################## site="$1" origin="$2" if [[ -z "$site" ]]; then # Print help echo -e "\033[1mUsage:\033[0m \033[34msite_origin\033[0m []" exit 1 fi # Delegate to project_origin project_origin "$HOME/web/sites/$site" "$origin" exit $?