-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathgit-nostr
More file actions
executable file
·138 lines (132 loc) · 2.76 KB
/
git-nostr
File metadata and controls
executable file
·138 lines (132 loc) · 2.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
#!/bin/bash
usage()
{
echo "
Usage: git nostr [command] [--help]
Commands:
help get help about a command
publish upload commits to nostr as patches
deleteall send delete request for all messages for key pair
list list git repo manifest ids
clone git init, set nostr config, fetch patches for author and apply to local repo
clones list all clones for a repo
create set git config.publickey to public key and upload all config patches to nostr
pull fetch patches for an author or manifestid and apply
push publish all unpublished patches to nostr
fork clone a repo, then create
forks list forks of a repo
issue create an issue for a repo
issues list issues for a repo
name publish a friendly name for a repo
names list named repos
pullrequest, pr create a pull request for a repo
pullrequests, prs list pull requests for a repo
authors List contributors to a repo
log List history of updates to a repo
name (not implemented) Name a repo
named (not implemented) Search for repos by name
web (not implemented) Serve a web server for repos
reconstruct (not implemented) Reconstruct blobs for a git-update nostr message
find-object (not implemented) Find a git object in a repo
"
exit 1
}
if [ $# -lt 1 ]
then
usage
fi
case $1 in
publish) # display Help
shift
# echo `publish.sh "$@" |tee >(head -n1) >(wc -l) >/dev/null`" nostr events created"
publish.sh "$@"
exit;;
deleteall)
shift
deleteall.sh "$@"
exit;;
list)
shift
list.sh "$@"
exit;;
clone)
shift
clone.sh "$@"
exit;;
clones)
shift
clones.sh "$@"
exit;;
create) # run git init, set nostr.privatekey, set nostr.relay
shift
create.sh "$@"
exit;;
pull)
shift
pull.sh "$@"
exit;;
push)
shift
push.sh "$@"
exit;;
fork)
shift
fork.sh "$@"
exit;;
forks)
shift
forks.sh "$@"
exit;;
issue)
shift
issue.sh "$@"
exit;;
issues)
shift
issues.sh "$@"
exit;;
pullrequest)
shift
pullrequest.sh "$@"
exit;;
pr)
shift
pullrequest.sh "$@"
exit;;
pullrequests)
shift
pullrequests.sh "$@"
exit;;
prs)
shift
pullrequests.sh "$@"
exit;;
authors)
shift
authors.sh "$@"
exit;;
log)
shift
log.sh "$@"
exit;;
name)
shift
name.sh "$@"
exit;;
names)
shift
names.sh "$@"
exit;;
help)
usage
exit;;
-h)
usage
exit;;
-help)
usage
exit;;
*)
echo "Error: Invalid command - \""$1"\""
exit ;;
esac