This makes the beginning of all files the same and a little simpler.
`${0%/*}` turns "/home/user/repository/bin/blackbox_edit" into
"/home/user/repository/bin", exactly like basename but without eating a
process.
Because other scripts needed `$blackbox_home` I made this into a
standardard variable that's always available.
This also loads _stack_lib.sh always because _blackbox_common.sh
requires it.
This solves some TODOs by moving shared code out into
`_blackbox_common.sh`.
New VCS commands were added, `vcs_ignore` and `vcs_notice` (the
opposite of ignore).
Made some utility functions
* `remove_filename_from_cryptlist` - The opposite of `add_file_to_cryptlist`
* `remove_line` - Removes a single line from a text file
* Using $BASEDIR to pass the location of the repo hasn't worked for a
while. It has been removed. Simply cd into the vcs repo before
running a command.
BUG FIXES:
* .gitignore was being created in subdirectories instead of VCS root.
MINOR CHANGES
* _blackbox_common.sh: Replace change_to_root with change_to_vcs_root
* confidence_test.sh: Added more assertions and tests.
- Fix forgetting unquotes command substitution in function vcs_relative_path.
- Using old test instead of new test in Makefile.
- Fix some variables for Bob in "confidence_test.sh".
* Command no longer need to be run from the base directory of the repo.
* blackbox_edit now asks "are you sure?" and is greatly simplified.
_blackbox_common.sh:
* add_filename_to_cryptlist now accepts paths relative to cwd.
* fail_if_not_on_cryptlist now accepts paths relative to cwd.
* new function: vcs_relative_path reports a path to the file relative to the REPOBASE.
* new function: is_on_cryptlist
plus...
* Some minor performance enhancesments and cleanups.
* confidence_test.sh now tests some commands while not in REPOBASE.
* 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.