Add experimental git-send-xmpp
Signed-off-by: Aoi K <koizumi.aoi@kyoko-project.wer.ee>
このコミットが含まれているのは:
コミット
5f2e5fd78d
|
@ -0,0 +1,29 @@
|
|||
#!/bin/sh
|
||||
# $KyokoNet: git-send-xmpp, v0.0.1 2022/11/11 22:14:55 akoizumi Exp $
|
||||
#
|
||||
# Send git patches over the XMPP protocol
|
||||
# https://git.kyoko-project.wer.ee/koizumi.aoi/git-crap
|
||||
|
||||
for arg; do
|
||||
case $arg in
|
||||
-h) usage ;;
|
||||
--pass=*) XMPPBRIDGE_PASSWORD="${arg#*=}" ;;
|
||||
--user=*) XMPPBRIDGE_JID="${arg#*=}" ;;
|
||||
--target=*) XMPPBRIDGE_PEER_JID="${arg#*=}" ;;
|
||||
--diff=*) diff="${arg#*=}" ;;
|
||||
*-*) printf "Unknown option %s\n" "$arg" ;;
|
||||
*=*) export "${arg:?}" ;;
|
||||
*) printf "Unknown argument: %s\n" "$arg" ;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -z $XMPPBRIDGE_PASSWORD && -z $XMPPBRIDGE_JID && -z $XMPPBRIDGE_PEER_JID && -z $diff ]; then
|
||||
usage
|
||||
exit 1
|
||||
else
|
||||
printf "Sending patch file %s to recipient %s over XMPP\n" "${diff}" "${XMPPBRIDGE_PEER_JID}"
|
||||
export XMPPBRIDGE_JID
|
||||
export XMPPBRIDGE_PASSWORD
|
||||
export XMPPBRIDGE_PEER_JID
|
||||
cat $diff | xmppbridge
|
||||
fi
|
読み込み中…
新しいイシューから参照