diff options
author | Akshay <[email protected]> | 2020-10-04 15:18:30 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2020-10-04 15:18:30 +0100 |
commit | 63a605fe09e1539a6d57c6232d7e7389fb9483f4 (patch) | |
tree | b943146b3fdfdea4dd8ace4a24072d401a26a97b | |
parent | 7a8922594307591d676c5a3fa94804a415055faa (diff) |
update set-desc cmd
-rwxr-xr-x | scripts/scripts/git-set-desc | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/scripts/scripts/git-set-desc b/scripts/scripts/git-set-desc index 08568fe..eee8830 100755 --- a/scripts/scripts/git-set-desc +++ b/scripts/scripts/git-set-desc | |||
@@ -1,11 +1,4 @@ | |||
1 | #! /usr/bin/env bash | 1 | #! /usr/bin/env bash |
2 | 2 | ||
3 | set_desc() { | 3 | remote=$(git remote get-url --push origin) |
4 | # $1 - desc | 4 | scp .git/description "$remote/description" |
5 | # $2 - repo name | ||
6 | [[ -d "$2" ]] && echo "$1" > "$2/description" || echo "$2: remote not found" | ||
7 | } | ||
8 | |||
9 | repo=${1:-$(basename $(pwd))}; | ||
10 | desc=$(cat "./.git/description") | ||
11 | ssh git@ferrn "$(typeset -f set_desc); set_desc \"$desc\" \"$repo\"" | ||