* Initialization for new repos AUTOMATED.
* 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.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
#
|
||||
# blackbox_register_new_file.sh -- Enroll a new file in the blackbox system.
|
||||
@@ -8,6 +8,8 @@
|
||||
# to systems that need the plaintext (unencrypted) versions, run
|
||||
# blackbox_postdeploy.sh to decrypt all the files.
|
||||
|
||||
# TODO(tlim): Add the unencrypted file to .gitignore
|
||||
|
||||
. _blackbox_common.sh
|
||||
|
||||
unencrypted_file=$(get_unencrypted_filename "$1")
|
||||
@@ -36,17 +38,15 @@ shred_file "$unencrypted_file"
|
||||
|
||||
VCSCMD=$(which_vcs)
|
||||
if $SECRETSEXPOSED ; then
|
||||
rm_from_vcs "$unencrypted_file"
|
||||
$VCSCMD add "$encrypted_file"
|
||||
# NOTE(tlim): Because we use $VCSCMD as a command, we can only use commands
|
||||
# that work for both git and hg.
|
||||
vcs_remove "$unencrypted_file"
|
||||
vcs_add "$encrypted_file"
|
||||
COMMIT_FILES="$BB_FILES $encrypted_file $unencrypted_file"
|
||||
else
|
||||
COMMIT_FILES="$BB_FILES $encrypted_file"
|
||||
fi
|
||||
echo 'NOTE: "already tracked!" messages are safe to ignore.'
|
||||
$VCSCMD add $BB_FILES $encrypted_file
|
||||
$VCSCMD commit -m"registered in blackbox: ${unencrypted_file}" $COMMIT_FILES
|
||||
vcs_add $BB_FILES $encrypted_file
|
||||
vcs_commit "registered in blackbox: ${unencrypted_file}" $COMMIT_FILES
|
||||
echo "========== UPDATING VCS: DONE"
|
||||
echo "Local repo updated. Please push when ready."
|
||||
echo " $VCSCMD push"
|
||||
|
||||
Reference in New Issue
Block a user