Auto commit: 2024-11-09 23:13:59
This commit is contained in:
parent
309c358259
commit
7f706ba05c
1 changed files with 4 additions and 2 deletions
|
@ -16,13 +16,15 @@ for config in "${configs[@]}"; do
|
||||||
find "$config" -type f -exec yadm add {} +
|
find "$config" -type f -exec yadm add {} +
|
||||||
done
|
done
|
||||||
|
|
||||||
|
sshenv="$HOME/.ssh/environment-$(cat /etc/hostname)"
|
||||||
|
|
||||||
# Commit and push if there are changes
|
# Commit and push if there are changes
|
||||||
if [[ -n $(yadm status --porcelain) ]]; then
|
if [[ -n $(yadm status --porcelain) ]]; then
|
||||||
yadm commit -m "Auto commit: $(date +'%Y-%m-%d %H:%M:%S')"
|
yadm commit -m "Auto commit: $(date +'%Y-%m-%d %H:%M:%S')"
|
||||||
# Check if the ssh-agent env is present
|
# Check if the ssh-agent env is present
|
||||||
if [ -f ~/.ssh/environment-dpad ]; then
|
if [ -f "$sshenv" ]; then
|
||||||
# source "$HOME/.ssh/environment-dpad"
|
# source "$HOME/.ssh/environment-dpad"
|
||||||
source "$HOME/.ssh/environment-$(cat /etc/hostname)"
|
source "$sshenv"
|
||||||
yadm push
|
yadm push
|
||||||
else
|
else
|
||||||
echo "ERROR: ssh-agent environment not found, aborting push..."
|
echo "ERROR: ssh-agent environment not found, aborting push..."
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue