Accept a name for dl and include starter script file
[khome.git] / home / bin / git-description
CommitLineData
de5b7b0b
SK
1#! /bin/sh
2
3set -e
4
5exe="$0"
6cmd="$1"
7remote="$2"
8
9usage() {
a87e65be 10 printf "Usage: %s (push|pull) REMOTE\n" "$exe"
de5b7b0b
SK
11 exit 1
12}
13
14case "$cmd" in
15 push | pull) ;;
16 *) usage ;;
17esac
18
19case "$remote" in
20 '') usage ;;
21 *) ;;
22esac
23
a87e65be 24file='description'
de5b7b0b 25remote_url=$(git remote get-url "$remote")
a87e65be
SK
26remote_path="${remote_url}/${file}"
27local_path=".git/${file}"
de5b7b0b
SK
28
29case "$cmd" in
a87e65be
SK
30 push) scp "$local_path" "$remote_path";;
31 pull) scp "$remote_path" "$local_path";;
de5b7b0b 32esac
This page took 0.085875 seconds and 4 git commands to generate.