src | ||
.gitignore | ||
LICENSE | ||
README.md |
JCB Power Updater
The JCB Power Updater is a script that automates the process of updating Git repositories in a specified directory. It goes through each directory and, if it's a Git repository, checks for any local changes. If changes are detected, it stages, commits, and pushes the changes. If a directory is not a Git repository, the script initializes a new Git repository, stages, and commits the files, then displays a message to link the new repository to a remote one.
The script can be installed, updated, and uninstalled with the following command-line options:
Installation
To install the JCB Power Updater, run the following command:
bash <(curl -s https://git.vdm.dev/api/v1/repos/octoleo/jcb-power-updater/raw/src/jcb-power-updater.sh) --install
This command downloads the script, installs it in /usr/local/bin/
, sets up a systemd service and timer, and creates a log directory and file.
Update
To update the JCB Power Updater script, run the following command:
jcb-power-updater --update
This command downloads the latest version of the script and updates the installed script.
Uninstallation
To uninstall the JCB Power Updater script, run the following command:
jcb-power-updater --uninstall
This command stops and disables the systemd timer, removes the systemd service and timer files, removes the installed script, and deletes the log directory and file.
Usage
Usage: jcb-power-updater [OPTION...]
Options
======================================================
--install
Install the JCB Power Updater script, set up the systemd service and timer, and create the log directory and file.
Example: jcb-power-updater --install
======================================================
--uninstall
Uninstall the JCB Power Updater script and remove related files and directories.
Example: jcb-power-updater --uninstall
======================================================
--update
Update the installed JCB Power Updater script.
Example: jcb-power-updater --update
======================================================
-d, --dir <dir>
Specify the directory containing the repositories.
Example: jcb-power-updater -d /path/to/your/repositories
======================================================
--gitea <URL>
Set the custom Gitea URL
Example: jcb-power-updater --gitea https://your.custom.gitea.url
Default: https://git.vdm.dev
======================================================
-q
Run the script in quiet mode, suppressing success messages.
Example: jcb-power-updater -q
======================================================
Compatibility Notice
This script has been tested and is compatible with major Linux distributions such as Ubuntu, Debian, Fedora, and CentOS. It should work on most systems that use systemd and support Bash. However, please note that the script might require minor modifications to work on other distributions or systems with different configurations.
Free Software License
@copyright Copyright (C) 2021 Llewellyn van der Merwe. All rights reserved.
@license GNU General Public License version 2; see LICENSE