Config dump.
This commit is contained in:
10
exokortex/.config/systemd/user/exokortex_auto_commit.service
Normal file
10
exokortex/.config/systemd/user/exokortex_auto_commit.service
Normal file
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Automated ExoKortex PARA Node Git Sweep
|
||||
Documentation=https://github.com/gortium
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=%h/.local/bin/exokortex_auto_commit.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
@@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=Run Automated ExoKortex Sweep Hourly
|
||||
|
||||
[Timer]
|
||||
OnCalendar=hourly
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
29
exokortex/.local/bin/exokortex_auto_commit.sh
Executable file
29
exokortex/.local/bin/exokortex_auto_commit.sh
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# ==============================================================================
|
||||
# PARA TARGET CONTROLS
|
||||
# Comment out (#) any directory to completely deactivate it from the sweep.
|
||||
# ==============================================================================
|
||||
TARGETS=(
|
||||
"$HOME/ExoKortex/1-Projects"
|
||||
"$HOME/ExoKortex/2-Areas"
|
||||
# "$HOME/ExoKortex/3-Resources"
|
||||
# "$HOME/ExoKortex/4-Archives/"
|
||||
)
|
||||
|
||||
# Protect against empty arrays if all targets get disabled
|
||||
if [ ${#TARGETS[@]} -eq 0 ]; then
|
||||
echo "Drop execution: No active PARA targets configured."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Execute strict structural scanning on active paths only
|
||||
find "${TARGETS[@]}" -mindepth 2 -maxdepth 2 -type d -name ".git" | while read -r gitdir; do
|
||||
repo_dir=$(dirname "$gitdir")
|
||||
cd "$repo_dir"
|
||||
|
||||
if [ -n "$(git status --porcelain)" ]; then
|
||||
git add .
|
||||
git commit -m "System: Automated background sweep $(date +'%Y-%m-%d %H:%M')"
|
||||
fi
|
||||
done
|
||||
Reference in New Issue
Block a user