ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/git-send/git-send-xmpp
Revision: 1.1
Committed: Mon Sep 30 00:56:08 2024 UTC (6 weeks, 4 days ago) by nishi
Branch: MAIN
CVS Tags: HEAD
Log Message:
moving files

File Contents

# Content
1 #!/bin/sh
2 # $TheSupernovaDuo: git-send-xmpp,v 0.0.4 2023/5/27 23:31:33 yakumo_izuru Exp $
3 #
4 # Send git patches over the XMPP protocol
5 # https://git.chaotic.ninja//yakumo.izuru/git-crap
6
7 # I have a feeling I could totally do this in Golang,
8 # if I wasn't inept with I/O handling in real programming
9 usage() {
10 cat <<EOF
11 Usage
12 git-send-xmpp --diff=<patch file> --pass=<password> --user=<user> --target=<target>
13 EOF
14 }
15
16 for arg; do
17 case $arg in
18 -h) usage ;;
19 --pass=*) pass="${arg#*=}" ;;
20 --user=*) user="${arg#*=}" ;;
21 --target=*) target="${arg#*=}" ;;
22 --diff=*) diff="${arg#*=}" ;;
23 *-*) printf "Unknown option %s\n" "$arg" ;;
24 *=*) export "${arg:?}" ;;
25 *) printf "Unknown argument: %s\n" "$arg" ;;
26 esac
27 done
28
29 if [ -z $pass && -z $user && -z $target && -z $diff ]; then
30 usage
31 exit 1
32 else
33 printf "Sending patch file %s to recipient %s over XMPP\n" "${diff}" "${target}"
34 go-sendxmpp -u ${user} -p ${pass} -h ${diff} -a ${user} ${target}
35 fi