cosmetic changes and updated README.md
This commit is contained in:
parent
1b3c18243c
commit
b5dd0f64f2
37
README.md
37
README.md
|
@ -2,17 +2,38 @@
|
||||||
|
|
||||||
My personal collection of handy scripts. mostly bash.
|
My personal collection of handy scripts. mostly bash.
|
||||||
|
|
||||||
- [restic-backup.sh](#restic-backup.sh)
|
| Name | Description |
|
||||||
- [restic-repos.sh](#restic-repos.sh)
|
| :--- | :---------- |
|
||||||
- [btrfs-snapshots.sh](#btrfs-snapshots.sh)
|
| [ci.sh](#ci.sh) | A poor man's CI system |
|
||||||
- [odroid-fancontrol.sh](#odroid-fancontrol.sh)
|
| [restic-backup.sh](#restic-backup.sh) | Simple wrapper script for [Restic](https://github.com/restic/restic) |
|
||||||
|
|
||||||
More:
|
## ci.sh
|
||||||
- [lib.sh](#lib.sh)
|
|
||||||
- [template.sh](#template.sh)
|
|
||||||
|
|
||||||
|
### Install
|
||||||
|
|
||||||
---
|
Clone this repository anywhere on your system and link it into your `$PATH`.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo su; cd
|
||||||
|
git clone https://git.socialnerds.org/david/scripts.git
|
||||||
|
ln -s /root/scripts/ci.sh /usr/local/bin/ci
|
||||||
|
```
|
||||||
|
|
||||||
|
### Usage
|
||||||
|
|
||||||
|
```bash
|
||||||
|
Usage:
|
||||||
|
ci <options> <git-repo>
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-s, --scripts <DIR> Specify the scripts directory (default: /root/ci-scripts)
|
||||||
|
-c, --checks <URL> Enable healthchecks.io integration
|
||||||
|
-n, --ntfy <URL> Enable ntfy.sh integration
|
||||||
|
-h, --help Print help screen and exit
|
||||||
|
-i, --info Print script information and exit
|
||||||
|
-v, --verbose More verbose output
|
||||||
|
-q, --quiet No output except errors (overrides -v)
|
||||||
|
```
|
||||||
|
|
||||||
## restic-backup.sh
|
## restic-backup.sh
|
||||||
|
|
||||||
|
|
2
ci.sh
2
ci.sh
|
@ -199,6 +199,8 @@ else
|
||||||
nohup "$SCRIPTS_DIR/$GIT_HOST/$GIT_USER/$GIT_REPO.sh" > "$TEMP_DIR/$GIT_HOST/$GIT_USER/$GIT_REPO.log" 2>&1 &
|
nohup "$SCRIPTS_DIR/$GIT_HOST/$GIT_USER/$GIT_REPO.sh" > "$TEMP_DIR/$GIT_HOST/$GIT_USER/$GIT_REPO.log" 2>&1 &
|
||||||
echo $! > "$TEMP_DIR/$GIT_HOST/$GIT_USER/$GIT_REPO.pid"
|
echo $! > "$TEMP_DIR/$GIT_HOST/$GIT_USER/$GIT_REPO.pid"
|
||||||
|
|
||||||
|
# Inform user of a successful job execution
|
||||||
|
lib_print "CI job has been triggered [$GIT_HOST/$GIT_USER/$GIT_REPO]"
|
||||||
lib_ntfy "$NTFY_URL" "CI job has been triggered [$GIT_HOST/$GIT_USER/$GIT_REPO]"
|
lib_ntfy "$NTFY_URL" "CI job has been triggered [$GIT_HOST/$GIT_USER/$GIT_REPO]"
|
||||||
lib_checks "$CHECKS_URL" "CI job has been triggered [$GIT_HOST/$GIT_USER/$GIT_REPO]"
|
lib_checks "$CHECKS_URL" "CI job has been triggered [$GIT_HOST/$GIT_USER/$GIT_REPO]"
|
||||||
fi
|
fi
|
||||||
|
|
5
lib.sh
5
lib.sh
|
@ -28,7 +28,9 @@ LIB_WEBSITE="https://git.socialnerds.org/david/scripts"
|
||||||
## Variables
|
## Variables
|
||||||
##
|
##
|
||||||
|
|
||||||
# Reset text formatting
|
|
||||||
|
# Text formatting
|
||||||
|
if [[ -t 1 ]]; then
|
||||||
LIB_CLEAR="\e[0m"
|
LIB_CLEAR="\e[0m"
|
||||||
|
|
||||||
# Text settings
|
# Text settings
|
||||||
|
@ -70,6 +72,7 @@ LIB_BLUE_BG_BOLD="\e[1;44m"
|
||||||
LIB_MAGENTA_BG_BOLD="\e[1;45m"
|
LIB_MAGENTA_BG_BOLD="\e[1;45m"
|
||||||
LIB_CYAN_BG_BOLD="\e[1;46m"
|
LIB_CYAN_BG_BOLD="\e[1;46m"
|
||||||
LIB_LIGHTGREY_BG_BOLD="\e[1;47m"
|
LIB_LIGHTGREY_BG_BOLD="\e[1;47m"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
##
|
##
|
||||||
|
|
Loading…
Reference in New Issue