* Adding new users AUTOMATED. * Update docs for the new, more simplified installation processes. * Remove dependency on any particular paths, etc. Copy "bin" into a place along your path and everything should "just work". * Add support for Mercurial (not tested). * blackbox_addadmin now adds keys to the keyring for you. * Unified #! lines to "#!/usr/bin/env bash" so it works better on FreeBSD. * BUGFIX: (BugId#1) blackbox_update_all_files.sh expects hg, fails for git. * BUGFIX: (BugId#2) blackbox_postdeploy.sh assumes certain directory layout. * BUGFIX: Temporary files aren't deleted. * NEW FILE: bin/blackbox_initialize: Automates enabling BB for a repo (creates directories, files, and updates .gitignore). * NEW FILE: bin/blackbox_removeadmin: Automates removing an admit. * NEW FILE: tools/confidence_test.sh: A battery of tests to verify operations. * NEW FILE: bin/Makefile: Automate package creation. * NEW FILE: bin/_stack_lib.sh: A library of shell routines from StackExchange.
30 lines
688 B
Bash
Executable File
30 lines
688 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
#
|
|
# blackbox_removeadmin -- Remove an admin to the system
|
|
# NOTE: Does not remove admin from the keyring.
|
|
#
|
|
|
|
# Example:
|
|
# blackbox_removeadmin tal@example.com
|
|
#
|
|
|
|
. _blackbox_common.sh
|
|
. _stack_lib.sh
|
|
|
|
fail_if_not_in_repo
|
|
|
|
KEYNAME="$1"
|
|
: ${KEYNAME:?ERROR: First argument must be a keyname (email address)} ;
|
|
|
|
# Remove the email address from the BB_ADMINS file.
|
|
make_self_deleting_tempfile bbtemp
|
|
cp "$BB_ADMINS" "$bbtemp"
|
|
fgrep -v -x "$KEYNAME" <"$bbtemp" >"$BB_ADMINS"
|
|
|
|
# Make a suggestion:
|
|
echo
|
|
echo
|
|
echo 'NEXT STEP: Check these into the repo. Probably with a command like...'
|
|
echo $VCS_TYPE commit -m\'REMOVED ADMIN: $KEYNAME\' "$BLACKBOXDATA/$BB_ADMINS_FILE"
|