Commit Graph

108 Commits

Author SHA1 Message Date
Alice Example
b523067536 Merge branch 'optimize-vcs-type' of git://github.com/fidian/blackbox into fidian-optimize-vcs-type 2015-06-20 19:02:45 +00:00
tlimoncelli@stackexchange.com
d45625086a blackbox_register_new_file: Accept multiple files on the command line. 2015-06-20 15:54:08 +00:00
tlimoncelli@stackexchange.com
c0dda22c9c Bug: blackbox_deregister_file deletes blackbox-files.txt
* Clarified symantics of blackbox_deregister_file in comments.
  * Added confidence test
2015-06-20 15:39:32 +00:00
Tyler Akins
cc1d7a1851 Removing the multiple calls to determine VCS type
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.
2015-06-16 17:24:35 -05:00
Tyler Akins
6de7cd99cb Always setting BLACKBOX_HOME
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.
2015-06-16 13:25:55 -05:00
tlimoncelli@stackexchange.com
33429b3ca6 Improve GPG 1.x compatibility. 2015-06-15 20:33:50 +00:00
tlimoncelli@stackexchange.com
a3fc4cbf4a Simplify handling of "SECRETSEXPOSED" 2015-06-15 20:33:21 +00:00
tlimoncelli@stackexchange.com
c129d06ea0 is_on_cryptlist reversed arguments to file_contains_line() 2015-06-15 20:32:35 +00:00
Tyler Akins
3968dab7c8 This line should not have continued to exist
The line immediately afterwards was what was intended.
2015-06-15 12:32:44 -05:00
Tyler Akins
af7db40263 Using make_self_deleting_tempfile
I missed this function earlier
2015-06-15 12:31:50 -05:00
Tyler Akins
287b97ccd6 Pulling greps into a common function
This will help eliminate problems and make searching consistent
2015-06-15 12:29:44 -05:00
Tyler Akins
6e04e42f4a Updated to use remove_line
I didn't notice this earlier
2015-06-15 12:22:39 -05:00
Tyler Akins
db9b2eef60 Using """x""" is identical to "x" 2015-06-12 13:27:42 -05:00
Tyler Akins
01e681035d Adding file deregister tool + extrapolating code
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
2015-06-12 13:23:45 -05:00
Tyler Akins
501c09ccd5 Removing TODO - it was completed earlier 2015-06-12 10:20:00 -05:00
tlimoncelli@stackexchange.com
2a839f1520 Fix path to blackbox_postdeploy 2015-06-03 15:34:01 -04:00
José Luis Lafuente
bef40214b8 Merge remote-tracking branch 'upstream/master' into keyring_new_format 2015-06-02 21:47:23 +02:00
tlimoncelli@stackexchange.com
02700b547a Update comments and add newly added files to packages. 2015-06-02 15:37:06 +00:00
tlimoncelli@stackexchange.com
9ba966445f fixup! 2015-06-02 11:12:15 -04:00
tlimoncelli@stackexchange.com
24ee6b3923 NEW: blacbox_decrypt_all_files: A wrapper around blackbox_postdeploy
which sets up the gpg-agent.
2015-06-02 11:11:27 -04:00
José Luis Lafuente
6489733299 Fix, GnuPG 2.1 keyring default extension is '.kbx' 2015-05-26 12:28:45 +02:00
Mike Dillon
9a0905a139 Send non-file output from blackbox_cat to STDERR 2015-05-14 09:36:13 -07:00
John Michel
56232aafc8 Fix issue on OS X when creating a temporary file
This prevents the "mktemp: too few X's in template ‘_stacklib_’" error message from appearing when adding another admin to blackbox and allows the command to successfully execute.

Related:
rtomayko/shocco#5
http://unix.stackexchange.com/q/87638/63283
2015-05-13 14:17:38 -04:00
tlimoncelli@stackexchange.com
4a5787cad8 Add support for using the commands outside of a repo. 2015-05-01 15:44:09 +00:00
tlimoncelli@stackexchange.com
123cad5e41 MERGE 2015-04-01 11:41:06 -04:00
Luis Buriola
7bbf1a4040 use which 2015-04-01 15:56:28 +01:00
Luis Buriola
9a7365dbf1 added bin/blackbox_whatsnew
show what has changed in the last commit for a given file
(some trailing whitespaces removed as well)
2015-04-01 12:20:01 +01:00
Stas Alekseev
caf7402a03 Adding support for perforce vcs. 2015-03-23 15:07:26 -04:00
Charles Prost
cbf0139cf5 [fix] Modify files loop to improve diff display 2015-03-23 14:13:13 +01:00
Justin Hart
120f3cb42b use agent for encrypt-decrypt 2015-03-20 17:41:55 -07:00
Charles Prost
3b76c6c936 [clean] Remove useless IFS save 2015-03-20 09:40:42 +01:00
Tom Limoncelli
124f265825 Merge pull request #61 from quarkslab/fix-support_filenames-with-space
Modify several scripts to support or improve support for filenames with space
2015-03-19 14:21:29 -07:00
Charles Prost
1debbd918b [add] Add blackbox_diff script 2015-03-19 14:38:29 +01:00
Charles Prost
a7b8c32da0 [clean] Improve display for filenames with spaces 2015-03-19 11:04:45 +01:00
Charles Prost
f78d25b004 [clean] Restore IFS for 'blackbox_postdeploy' 2015-03-19 10:55:37 +01:00
Charles Prost
d8fb3e855d [fix] Support filenames with space for 'blackbox_shred_all_files' 2015-03-19 10:53:49 +01:00
Charles Prost
08b0103136 [fix] Support filenames with space for 'blackbox_update_all_files' 2015-03-19 10:52:21 +01:00
tlimoncelli@stackexchange.com
225d38ee11 BACKWARDS INCOMPATIBLE CHANGES:
* 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.
2015-03-10 21:16:27 +00:00
Jon Warbrick
b35c09609b Avoid needing blackbox scripts on $PATH
blackbox_edit and blackbox_cat use other blackbox scripts internally,
but assume that they will be found on $PATH. In testing it's useful to
be able to run these scripts by pathname without first putting them on
$PATH, and all the other scripts work just fine in these circumstances.

This edit fixes this by prefixing all references to other scripts in
blackbox_edit and blackbox_cat with ${blackbox_home}, which is conveniently
set as part of sourcing _blackbox_common.sh.
2015-03-08 19:59:55 +00:00
LE Manh Cuong
90dc874d56 Register new file now work with space in filename. 2015-03-06 11:33:39 +07:00
LE Manh Cuong
19532b82d5 Issue 50:
- 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".
2015-03-03 09:31:09 +07:00
LE Manh Cuong
5428aed2d7 Fix many bugs for unquote variables. 2015-02-27 01:09:59 +07:00
tlimoncelli@stackexchange.com
7cfb47c09b blackbox_list_files: Only list files. No extra text. (Makes it easier to work with grep and other utilities) 2015-02-16 16:16:40 +00:00
tlimoncelli@stackexchange.com
503b26d354 blackbox_update_all_files: Clarify comment. 2015-02-16 11:09:58 -05:00
Tom Limoncelli
27df8eadf0 Merge pull request #42 from jrodriguezjr/master
List files that BlackBox is tracking
2015-02-16 10:59:28 -05:00
Bryan Roberts
63b5dc9de4 Fixed parameter expansion in _blackbox_common.sh for EDITOR 2015-02-15 11:52:34 -05:00
Bryan Roberts
d4fd6cf8ed Removed check for EDITOR from blackbox_edit 2015-02-15 11:40:00 -05:00
Bryan Roberts
e5028b0fdb Removed blackbox_view since blackbox_cat already exists 2015-02-15 02:36:11 -05:00
Bryan Roberts
9b5af9f85c Added EDITOR default to _blackbox_common.sh 2015-02-15 02:35:03 -05:00
Bryan Roberts
a95a5ef629 Fixed argument for deletion 2015-02-15 02:22:41 -05:00