Otherwise, somebody with neither shred nor srm installed could blithely
go on using Blackbox assuming that their working copies are getting
securely deleted.
If you install Git for Windows (https://git-for-windows.github.io/) you get a console
,either CMD or MINTT, which returns MINGW* for uname -s. So if you run blackbox_addadmin
or the other commands, you'll get: "ERROR: Unknown OS. Exiting."
I've simply added MINGW* to the Linux and CYGWIN checks and it seems to work fine.
NOTE: I didn't touch tools/test_functions.sh allthough it should probably be updated as well.
* Split out test helper functions into tools/test_functions.sh
* bin/_blackbox_common_test.sh: Unit-tests for functions.
* blackbox_postdeploy: Use cp_permissions instead of chmod --reference
IGNOREFILE variable no longer exists which resulted in calling "vcs_add <empty
string>" command adding all untracked files when blackbox_initialize is called
This removed the subshell from _determine_vcs_base_and_type so it can
set environment variables.
Because this always runs at the beginning of the scripts, there's no
need to do checking if REPOBASE is unset or if VCS_TYPE is not yet
determined, thus I simplified one function and eliminated which_vcs.
Conflicts:
bin/blackbox_deregister_file
I found this easier to just cherry pick since there was a merge and the
merge was reverted.
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".