#! /bin/sh set -e exe="$0" cmd="$1" remote="$2" usage() { printf "Usage: %s (push|pull) REMOTE\n" "$exe" exit 1 } case "$cmd" in push | pull) ;; *) usage ;; esac case "$remote" in '') usage ;; *) ;; esac file='description' remote_url=$(git remote get-url "$remote") remote_path="${remote_url}/${file}" local_path=".git/${file}" case "$cmd" in push) scp "$local_path" "$remote_path";; pull) scp "$remote_path" "$local_path";; esac