X-Git-Url: https://git.xandkar.net/?a=blobdiff_plain;f=home%2Fbin%2Fgit-description;h=14085bccee84b82b4cd1a424f57b0e8c00353347;hb=e7e33e7832a806c3a3a1214461acdd7bb257fc1f;hp=710336bdbd01fbf0840bd122cb730e451621abfc;hpb=de5b7b0bea20c4df7f5f9a63e2b5fc5aaf8af149;p=khome.git diff --git a/home/bin/git-description b/home/bin/git-description index 710336b..14085bc 100755 --- a/home/bin/git-description +++ b/home/bin/git-description @@ -7,7 +7,7 @@ cmd="$1" remote="$2" usage() { - printf "Usage: %s [push|pull] REMOTE\n" "$exe" + printf "Usage: %s (push|pull) REMOTE\n" "$exe" exit 1 } @@ -21,11 +21,12 @@ case "$remote" in *) ;; esac +file='description' remote_url=$(git remote get-url "$remote") -remote_file="${remote_url}/description" -local_file='.git/description' +remote_path="${remote_url}/${file}" +local_path=".git/${file}" case "$cmd" in - push) scp "$local_file" "$remote_file";; - pull) scp "$remote_file" "$local_file";; + push) scp "$local_path" "$remote_path";; + pull) scp "$remote_path" "$local_path";; esac