/[git-send]/trunk/git-send-xmpp
ViewVC logotype

Annotation of /trunk/git-send-xmpp

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (hide annotations)
Mon Sep 30 00:57:01 2024 UTC (6 weeks, 4 days ago) by nishi
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
moving files

1 yakumo_izuru 1.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

nishi@chaotic.ninja
ViewVC Help
Powered by ViewVC 1.3.0-dev