Support previewing favorites
[khome.git] / home / bin / git-readme
CommitLineData
4c710954
SK
1#! /bin/sh
2
3set -e
4
5exe="$0"
6cmd="push"
7remote="$1"
8
9usage() {
10 printf 'Usage: %s REMOTE\n' "$exe"
11 exit 1
12}
13
14case "$cmd" in
15 push) ;;
16 *) usage ;;
17esac
18
19case "$remote" in
20 '') usage ;;
21 *) ;;
22esac
23
24file_src='README.md'
25file_out='README.html'
26
27pandoc "$file_src" > "$file_out"
28
29local_path="$file_out"
30remote_url=$(git remote get-url "$remote")
31remote_path="${remote_url}/$file_out"
32
33case "$cmd" in
34 push) scp "$local_path" "$remote_path";;
35 pull) scp "$remote_path" "$local_path";;
36esac
This page took 0.098004 seconds and 4 git commands to generate.