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
This commit is contained in:
@@ -25,28 +25,7 @@ fi
|
||||
change_to_vcs_root
|
||||
|
||||
echo VCS_TYPE: $VCS_TYPE
|
||||
|
||||
if [[ $VCS_TYPE = "git" || $VCS_TYPE = "hg" ]]; then
|
||||
# Update .gitignore or .hgignore
|
||||
|
||||
IGNOREFILE="${REPOBASE}/.${VCS_TYPE}ignore"
|
||||
if ! grep -sx >/dev/null 'pubring.gpg~' "$IGNOREFILE" ; then
|
||||
echo 'pubring.gpg~' >>"$IGNOREFILE"
|
||||
fi
|
||||
if ! grep -sx >/dev/null 'pubring.kbx~' "$IGNOREFILE" ; then
|
||||
echo 'pubring.kbx~' >>"$IGNOREFILE"
|
||||
fi
|
||||
if ! grep -sx >/dev/null 'secring.gpg' "$IGNOREFILE" ; then
|
||||
echo 'secring.gpg' >>"$IGNOREFILE"
|
||||
fi
|
||||
elif [[ $VCS_TYPE = "svn" ]]; then
|
||||
# add file to svn ignore propset
|
||||
IGNOREFILE="";
|
||||
svn propset svn:ignore 'pubring.gpg~
|
||||
pubring.kbx~
|
||||
secring.gpg' .
|
||||
svn commit -m "ignore file list"
|
||||
fi
|
||||
vcs_ignore keyrings/live/pubring.gpg~ keyrings/live/pubring.kbx~ keyrings/live/secring.gpg
|
||||
|
||||
# Make directories
|
||||
mkdir -p "${KEYRINGDIR}"
|
||||
|
||||
Reference in New Issue
Block a user