Created
June 16, 2018 03:03
-
-
Save junderw/6a20565f4df0d4ef5224f3ff1193cabd to your computer and use it in GitHub Desktop.
Function for adding keybase subteam
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
make_keybase_subteam(){ | |
# usage: | |
# make_keybase_subteam myteam newsubteam | |
# creates the subteam, sets good defaults, then turns it into a big team. | |
# will automatically join subteam. | |
if [ -z "$1" ]; then | |
echo "need to specify team name" | |
return 1 | |
else | |
TEAMNAME="$1" | |
fi | |
if [ -z "$2" ]; then | |
echo "need to specify subteam name" | |
return 1 | |
else | |
SUBTEAMNAME="$2" | |
fi | |
keybase team create -j "$TEAMNAME"."$SUBTEAMNAME" || return 1 | |
keybase team settings "$TEAMNAME"."$SUBTEAMNAME" --allow-profile-promote=no || return 1 | |
keybase team settings "$TEAMNAME"."$SUBTEAMNAME" --disable-access-requests=yes || return 1 | |
if [ -z "$3" ]; then | |
echo "No description" | |
else | |
keybase team settings "$TEAMNAME"."$SUBTEAMNAME" --description="$3" || return 1 | |
fi | |
keybase chat create-channel "$TEAMNAME"."$SUBTEAMNAME" random || return 1 | |
keybase chat leave-channel "$TEAMNAME"."$SUBTEAMNAME" random || return 1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment