Add "set -e" to all scripts.
This commit is contained in:
@@ -5,12 +5,12 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
# Usage:
|
# Usage:
|
||||||
|
#
|
||||||
|
# set -e
|
||||||
# . _blackbox_common.sh
|
# . _blackbox_common.sh
|
||||||
|
|
||||||
# Where in the VCS repo should the blackbox data be found?
|
# Where in the VCS repo should the blackbox data be found?
|
||||||
: ${BLACKBOXDATA:=keyrings/live} ; # If BLACKBOXDATA not set, set it.
|
: ${BLACKBOXDATA:=keyrings/live} ; # If BLACKBOXDATA not set, set it.
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# Outputs a string that is the base directory of this VCS repo.
|
# Outputs a string that is the base directory of this VCS repo.
|
||||||
# By side-effect, sets the variable VCS_TYPE to either 'git', 'hg',
|
# By side-effect, sets the variable VCS_TYPE to either 'git', 'hg',
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
# Library functions for bash scripts at Stack Exchange.
|
# Library functions for bash scripts at Stack Exchange.
|
||||||
|
|
||||||
# Usage:
|
# Usage:
|
||||||
|
# set -e
|
||||||
# . _stack_lib.sh
|
# . _stack_lib.sh
|
||||||
|
|
||||||
# ----- Utility Functions -----
|
# ----- Utility Functions -----
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
# blackbox_addadmin tal@example.com
|
# blackbox_addadmin tal@example.com
|
||||||
#
|
#
|
||||||
|
|
||||||
|
set -e
|
||||||
. _blackbox_common.sh
|
. _blackbox_common.sh
|
||||||
. _stack_lib.sh
|
. _stack_lib.sh
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
# blackbox_edit.sh -- Decrypt a file temporarily for edition, then re-encrypts it again
|
# blackbox_edit.sh -- Decrypt a file temporarily for edition, then re-encrypts it again
|
||||||
#
|
#
|
||||||
|
|
||||||
|
set -e
|
||||||
. _blackbox_common.sh
|
. _blackbox_common.sh
|
||||||
|
|
||||||
for param in """$@""" ; do
|
for param in """$@""" ; do
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
# blackbox_edit_end -- Re-encrypt file after edits.
|
# blackbox_edit_end -- Re-encrypt file after edits.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
set -e
|
||||||
. _blackbox_common.sh
|
. _blackbox_common.sh
|
||||||
|
|
||||||
unencrypted_file=$(get_unencrypted_filename "$1")
|
unencrypted_file=$(get_unencrypted_filename "$1")
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
# blackbox_edit_start.sh -- Decrypt a file for editing.
|
# blackbox_edit_start.sh -- Decrypt a file for editing.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
set -e
|
||||||
. _blackbox_common.sh
|
. _blackbox_common.sh
|
||||||
|
|
||||||
for param in """$@""" ; do
|
for param in """$@""" ; do
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
# blackbox_initialize
|
# blackbox_initialize
|
||||||
#
|
#
|
||||||
|
|
||||||
|
set -e
|
||||||
. _blackbox_common.sh
|
. _blackbox_common.sh
|
||||||
|
|
||||||
_determine_vcs_base_and_type # Sets VCS_TYPE
|
_determine_vcs_base_and_type # Sets VCS_TYPE
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
# force /usr/bin and /bin to the front of the PATH.
|
# force /usr/bin and /bin to the front of the PATH.
|
||||||
export PATH=/usr/bin:/bin:"$PATH"
|
export PATH=/usr/bin:/bin:"$PATH"
|
||||||
|
|
||||||
|
set -e
|
||||||
. _blackbox_common.sh
|
. _blackbox_common.sh
|
||||||
|
|
||||||
if [[ "$1" == "" ]]; then
|
if [[ "$1" == "" ]]; then
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
# TODO(tlim): Add the unencrypted file to .gitignore
|
# TODO(tlim): Add the unencrypted file to .gitignore
|
||||||
|
|
||||||
|
set -e
|
||||||
. _blackbox_common.sh
|
. _blackbox_common.sh
|
||||||
|
|
||||||
unencrypted_file=$(get_unencrypted_filename "$1")
|
unencrypted_file=$(get_unencrypted_filename "$1")
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
# blackbox_removeadmin tal@example.com
|
# blackbox_removeadmin tal@example.com
|
||||||
#
|
#
|
||||||
|
|
||||||
|
set -e
|
||||||
. _blackbox_common.sh
|
. _blackbox_common.sh
|
||||||
. _stack_lib.sh
|
. _stack_lib.sh
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
# blackbox_edit_start.sh -- Decrypt a file for editing.
|
# blackbox_edit_start.sh -- Decrypt a file for editing.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
set -e
|
||||||
. _blackbox_common.sh
|
. _blackbox_common.sh
|
||||||
|
|
||||||
for param in """$@""" ; do
|
for param in """$@""" ; do
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
# blackbox_edit_end.sh -- Re-encrypt file after edits.
|
# blackbox_edit_end.sh -- Re-encrypt file after edits.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
set -e
|
||||||
. _blackbox_common.sh
|
. _blackbox_common.sh
|
||||||
|
|
||||||
if [[ -z $GPG_AGENT_INFO ]]; then
|
if [[ -z $GPG_AGENT_INFO ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user