2
binv2/blackbox_addadmin
Executable file
2
binv2/blackbox_addadmin
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env bash
|
||||
exec blackbox admin add "$@"
|
||||
2
binv2/blackbox_cat
Executable file
2
binv2/blackbox_cat
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env bash
|
||||
exec blackbox cat "$@"
|
||||
2
binv2/blackbox_decrypt_all_files
Executable file
2
binv2/blackbox_decrypt_all_files
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env bash
|
||||
exec blackbox decrypt --all --agentcheck=true --overwrite "@"
|
||||
2
binv2/blackbox_decrypt_file
Executable file
2
binv2/blackbox_decrypt_file
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env bash
|
||||
exec blackbox decrypt --overwrite "$@"
|
||||
2
binv2/blackbox_deregister_file
Executable file
2
binv2/blackbox_deregister_file
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env bash
|
||||
exec blackbox file remove --safe "$@"
|
||||
2
binv2/blackbox_diff
Executable file
2
binv2/blackbox_diff
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env bash
|
||||
exec blackbox diff --diff "$@"
|
||||
2
binv2/blackbox_edit
Executable file
2
binv2/blackbox_edit
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env bash
|
||||
exec blackbox edit "$@"
|
||||
2
binv2/blackbox_edit_end
Executable file
2
binv2/blackbox_edit_end
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env bash
|
||||
exec blackbox encrypt --shred "$@"
|
||||
2
binv2/blackbox_edit_start
Executable file
2
binv2/blackbox_edit_start
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env bash
|
||||
exec blackbox decrypt "$@"
|
||||
2
binv2/blackbox_initialize
Executable file
2
binv2/blackbox_initialize
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env bash
|
||||
exec blackbox init "$@"
|
||||
2
binv2/blackbox_list_admins
Executable file
2
binv2/blackbox_list_admins
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env bash
|
||||
exec blackbox admin list
|
||||
2
binv2/blackbox_list_files
Executable file
2
binv2/blackbox_list_files
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env bash
|
||||
exec blackbox file list
|
||||
2
binv2/blackbox_listadmins
Executable file
2
binv2/blackbox_listadmins
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env bash
|
||||
exec blackbox admin list
|
||||
2
binv2/blackbox_postdeploy
Executable file
2
binv2/blackbox_postdeploy
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env bash
|
||||
blackbox decrypt --all --overwrite --group "$1"
|
||||
2
binv2/blackbox_register_new_file
Executable file
2
binv2/blackbox_register_new_file
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env bash
|
||||
exec blackbox file add --shred "$@"
|
||||
2
binv2/blackbox_removeadmin
Executable file
2
binv2/blackbox_removeadmin
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env bash
|
||||
exec blackbox admin remove "$@"
|
||||
2
binv2/blackbox_shred_all_files
Executable file
2
binv2/blackbox_shred_all_files
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env bash
|
||||
exec blackbox shred --all
|
||||
2
binv2/blackbox_update_all_files
Executable file
2
binv2/blackbox_update_all_files
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env bash
|
||||
exec blackbox reencrypt --all --agentcheck
|
||||
2
binv2/blackbox_view
Executable file
2
binv2/blackbox_view
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env bash
|
||||
blackbox cat "$@" | ${PAGER:-less}
|
||||
51
binv2/blackbox_whatsnew
Executable file
51
binv2/blackbox_whatsnew
Executable file
@@ -0,0 +1,51 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
#
|
||||
# blackbox_whatsnew - show what has changed in the last commit for a given file
|
||||
#
|
||||
exec blackbox whatsnew "$@"
|
||||
exit 0
|
||||
|
||||
set -e
|
||||
source "${0%/*}/_blackbox_common.sh"
|
||||
|
||||
if [[ $# -ne 1 ]]
|
||||
then
|
||||
echo "Pass only 1 file at a time"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
fail_if_not_in_repo
|
||||
gpg_agent_notice
|
||||
|
||||
COLUMNS=`tput cols`
|
||||
FILE=$1
|
||||
GIT="git log --abbrev-commit --pretty=oneline"
|
||||
CURR_COMMIT=`$GIT $FILE | head -1 | awk '{print $1}'`
|
||||
PREV_COMMIT=`$GIT ${CURR_COMMIT}~1 $FILE | head -1 | awk '{print $1}'`
|
||||
# Use colordiff if available
|
||||
if which colordiff > /dev/null 2>&1
|
||||
then DIFF="colordiff"
|
||||
else DIFF="diff"
|
||||
fi
|
||||
|
||||
cat_commit()
|
||||
{
|
||||
COMMIT=$1
|
||||
git checkout $COMMIT $FILE
|
||||
echo "[$COMMIT] $FILE"
|
||||
echo "---------------------"
|
||||
"${BLACKBOX_HOME}/blackbox_cat" $FILE | sed '/========== PLAINFILE/,/========== EXTRACTING/d'
|
||||
}
|
||||
|
||||
CURR_CONTENT=`cat_commit $CURR_COMMIT`
|
||||
PREV_CONTENT=`cat_commit $PREV_COMMIT`
|
||||
clear
|
||||
|
||||
# For some unknown reason this command executes fine but return exit code 1
|
||||
$DIFF -y --width $COLUMNS \
|
||||
<(echo "CURRENT" "$CURR_CONTENT" | fold -w $(( $COLUMNS / 2 - 4 )) ) \
|
||||
<(echo "PREVIOUS" "$PREV_CONTENT" | fold -w $(( $COLUMNS / 2 - 4 )) )
|
||||
|
||||
git checkout $CURR_COMMIT $FILE
|
||||
echo
|
||||
Reference in New Issue
Block a user