Skip to content

Instantly share code, notes, and snippets.

@chertov
Created May 14, 2021 22:30
Show Gist options
  • Save chertov/c8698d968709fe7e078ed87cc344c255 to your computer and use it in GitHub Desktop.
Save chertov/c8698d968709fe7e078ed87cc344c255 to your computer and use it in GitHub Desktop.
#!/bin/bash
export GITHUB_TOKEN=<YOUR GITHUB TOKEN>
USER=<YOUR USERNAME>
WEBRTC_RS=webrtc-rs
# brew install gh
gh repo list ${WEBRTC_RS}
function delete_repo() {
local name=$1
gh api -XDELETE repos/${name}
}
# delete_repo ${USER}/mdns
# delete_repo ${USER}/util
# delete_repo ${USER}/sip
# delete_repo ${USER}/webrtc-1
# delete_repo ${USER}/data
# delete_repo ${USER}/turn
# delete_repo ${USER}/stun
# delete_repo ${USER}/srtp
# delete_repo ${USER}/sdp
# delete_repo ${USER}/sctp
# delete_repo ${USER}/rtp
# delete_repo ${USER}/rtcp
# delete_repo ${USER}/rtc
# delete_repo ${USER}/pc
# delete_repo ${USER}/media
# delete_repo ${USER}/ice
# delete_repo ${USER}/dtls
# delete_repo ${USER}/webrtc-rs.github.io
# delete_repo ${USER}/sip
# gh repo fork ${WEBRTC_RS}/mdns --clone=false
# gh repo fork ${WEBRTC_RS}/util --clone=false
# gh repo fork ${WEBRTC_RS}/sip --clone=false
# gh repo fork ${WEBRTC_RS}/data --clone=false
# gh repo fork ${WEBRTC_RS}/turn --clone=false
# gh repo fork ${WEBRTC_RS}/stun --clone=false
# gh repo fork ${WEBRTC_RS}/srtp --clone=false
# gh repo fork ${WEBRTC_RS}/sdp --clone=false
# gh repo fork ${WEBRTC_RS}/sctp --clone=false
# gh repo fork ${WEBRTC_RS}/rtp --clone=false
# gh repo fork ${WEBRTC_RS}/rtcp --clone=false
# gh repo fork ${WEBRTC_RS}/rtc --clone=false
# gh repo fork ${WEBRTC_RS}/pc --clone=false
# gh repo fork ${WEBRTC_RS}/media --clone=false
# gh repo fork ${WEBRTC_RS}/ice --clone=false
# gh repo fork ${WEBRTC_RS}/dtls --clone=false
function add_prefix_to_repo_name() {
local prefix=$1
local user=$2
local name=$3
gh api -XPATCH repos/${user}/${name} -f name=${prefix}-${name}
}
# add_prefix_to_repo_name ${WEBRTC_RS} ${USER} mdns
# add_prefix_to_repo_name ${WEBRTC_RS} ${USER} util
# add_prefix_to_repo_name ${WEBRTC_RS} ${USER} sip
# add_prefix_to_repo_name ${WEBRTC_RS} ${USER} data
# add_prefix_to_repo_name ${WEBRTC_RS} ${USER} turn
# add_prefix_to_repo_name ${WEBRTC_RS} ${USER} stun
# add_prefix_to_repo_name ${WEBRTC_RS} ${USER} srtp
# add_prefix_to_repo_name ${WEBRTC_RS} ${USER} sdp
# add_prefix_to_repo_name ${WEBRTC_RS} ${USER} sctp
# add_prefix_to_repo_name ${WEBRTC_RS} ${USER} rtp
# add_prefix_to_repo_name ${WEBRTC_RS} ${USER} rtcp
# add_prefix_to_repo_name ${WEBRTC_RS} ${USER} rtc
# add_prefix_to_repo_name ${WEBRTC_RS} ${USER} pc
# add_prefix_to_repo_name ${WEBRTC_RS} ${USER} media
# add_prefix_to_repo_name ${WEBRTC_RS} ${USER} ice
# add_prefix_to_repo_name ${WEBRTC_RS} ${USER} dtls
# git clone [email protected]:${USER}/${WEBRTC_RS}-mdns.git ./mdns
# git clone [email protected]:${USER}/${WEBRTC_RS}-data.git ./data
# git clone [email protected]:${USER}/${WEBRTC_RS}-turn.git ./turn
# git clone [email protected]:${USER}/${WEBRTC_RS}-util.git ./util
# git clone [email protected]:${USER}/${WEBRTC_RS}-stun.git ./stun
# git clone [email protected]:${USER}/${WEBRTC_RS}-srtp.git ./srtp
# git clone [email protected]:${USER}/${WEBRTC_RS}-sdp.git ./sdp
# git clone [email protected]:${USER}/${WEBRTC_RS}-sctp.git ./sctp
# git clone [email protected]:${USER}/${WEBRTC_RS}-rtp.git ./rtp
# git clone [email protected]:${USER}/${WEBRTC_RS}-rtcp.git ./rtcp
# git clone [email protected]:${USER}/${WEBRTC_RS}-rtc.git ./rtc
# git clone [email protected]:${USER}/${WEBRTC_RS}-pc.git ./pc
# git clone [email protected]:${USER}/${WEBRTC_RS}-media.git ./media
# git clone [email protected]:${USER}/${WEBRTC_RS}-ice.git ./ice
# git clone [email protected]:${USER}/${WEBRTC_RS}-dtls.git ./dtls
# git clone [email protected]:${USER}/${WEBRTC_RS}-sip.git ./sip
cat > Cargo.toml <<- EndOfMessage
[workspace]
members = [
"data",
"dtls",
"ice",
"mdns",
"media",
"pc",
"rtc",
"rtcp",
"rtp",
"sctp",
"sdp",
"srtp",
"stun",
"turn",
"util",
]
[patch.crates-io]
webrtc-data = { path = "data" }
webrtc-dtls = { path = "dtls" }
webrtc-ice = { path = "ice" }
webrtc-mdns = { path = "mdns" }
webrtc-media = { path = "media" }
webrtc-pc = { path = "pc" }
rtc = { path = "rtc" }
rtcp = { path = "rtcp" }
rtp = { path = "rtp" }
webrtc-sctp = { path = "sctp" }
sdp = { path = "sdp" }
webrtc-srtp = { path = "srtp" }
stun = { path = "stun" }
turn = { path = "turn" }
webrtc-util = { path = "util" }
EndOfMessage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment