diff --git a/create-cron-job.sh b/create-cron-job.sh new file mode 100755 index 0000000..1a84803 --- /dev/null +++ b/create-cron-job.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +set -e +GIT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd) +( + crontab -l 2>/dev/null + echo "* * * * * $GIT_DIR/commit.sh" +) | crontab - + +############################################################################ +# NOTE: commit signing must be turned off, or not require any interaction. # +############################################################################ diff --git a/run-distro-de-script.sh b/run-distro-de-script.sh index 836ee7c..5215b2b 100755 --- a/run-distro-de-script.sh +++ b/run-distro-de-script.sh @@ -4,15 +4,12 @@ command_exists() { type "$1" &>/dev/null; } cd distro-specific-scripts/ distro="" - if command_exists "pacman"; then distro="arch" elif command_exists "dnf" || command_exists "rpm-ostree"; then distro="fedora" elif command_exists "xbps-install"; then distro="void" -else - exit fi ./${distro}-${XDG_CURRENT_DESKTOP}.sh