18 Commits

Author SHA1 Message Date
tlimoncelli@stackexchange.com
aee22fc99d Reorganize tests
* 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
2015-07-24 09:01:00 -04:00
Maxime Poulin
649a75e459 File permissions now persits 2015-07-23 10:14:39 -04: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
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
Charles Prost
3b76c6c936 [clean] Remove useless IFS save 2015-03-20 09:40:42 +01:00
Charles Prost
f78d25b004 [clean] Restore IFS for 'blackbox_postdeploy' 2015-03-19 10:55:37 +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
LE Manh Cuong
5428aed2d7 Fix many bugs for unquote variables. 2015-02-27 01:09:59 +07:00
Warren Gray
beefbfb912 - Fix blackbox commands so that they work when called with absolute paths.
- Fix confidence_test.sh so that it's not hardcoded to a specific dev environment path.
2015-01-13 14:42:58 -05:00
harrison
26ec9319e3 blackbox_shred_all_files now changes to root dir before running. Moved similar code from blackbox_postdeploy into _blackbox_common.sh as change_to_root function. 2014-11-06 00:28:53 -08:00
tlimoncelli@stackexchange.com
eb96b6d1fc Use sh-compatible version of redirection. 2014-11-05 16:48:26 +00:00
tlimoncelli@stackexchange.com
d68af832b3 Fix problem that crashes pinentry 2014-11-05 16:00:49 +00:00
Christophe Biocca
14edf71e83 Uses umask to avoid creating world-readable files. 2014-09-24 00:33:52 -04:00
tlimoncelli@stackexchange.com
28bff4ff9f Add "set -e" to all scripts. 2014-09-08 20:25:38 +00:00
tlimoncelli@stackexchange.com
f222516526 * blackbox_postdeploy should accept an optional parameter for chgrp.
* blackbox_postdeploy should 'cd' to $BASEDIR or the base VCS directory.
* Add unit tests to confidence_test.sh to cover chgrp functionality.
2014-09-02 22:10:37 +00:00
tlimoncelli@stackexchange.com
4702a9a207 * Test use-case where secrets had previously been exposed.
* BUG: blackbox_postdeploy should not "chgrp" files.
2014-09-01 18:59:57 +00:00
tlimoncelli@stackexchange.com
d74eeb33c7 * 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.
2014-08-29 20:21:02 +00:00
tlimoncelli@stackexchange.com
f387bc9f30 Remove ".sh" from file names.
Refactor so it does not rely on PWD being the repo basedir.
Fix assumptions about HG and GIT use.
2014-08-28 20:47:32 +00:00