mirror of
https://github.com/TheLocehiliosan/yadm
synced 2024-10-27 20:34:27 +00:00
Offer to add files.gpg
if untracked
This commit is contained in:
parent
d1fe16407d
commit
2ede46f5e4
12
yadm
12
yadm
@ -240,6 +240,18 @@ function encrypt() {
|
||||
error_out "Unable to write $YADM_ARCHIVE"
|
||||
fi
|
||||
|
||||
#; offer to add YADM_ARCHIVE if untracked
|
||||
archive_status=$(git status --porcelain -uall "$YADM_ARCHIVE" 2>/dev/null)
|
||||
archive_regex="^\?\?"
|
||||
if [[ $archive_status =~ $archive_regex ]] ; then
|
||||
echo "It appears that $YADM_ARCHIVE is not tracked by yadm's repository."
|
||||
echo "Would you like to add it now? (y/n)"
|
||||
read answer
|
||||
if [[ $answer =~ ^[yY]$ ]] ; then
|
||||
git add "$YADM_ARCHIVE"
|
||||
fi
|
||||
fi
|
||||
|
||||
CHANGES_POSSIBLE=1
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user