-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
setup-server, mount-helper: bugfixes
- config-edit: - cleaner output without useless padding - edit: - vscode no longer supports sudo editing - cleaned up the code to make it clearer - fs-own: - correct exit status on invalid paths and missing paths, such that chmod/chown failures are distinguishable from existence, access, and validity failures - fix --optional still failing on chmod fails - fs-rm: - no longer noisy on empty directories - trimming empty directories no longer noisy with silly find errors - get-devices: - support --quiet - added is-abort: - abstacted out and added support for more abort exist statuses, such that complex abort handling such as inside mount-helper becomes streamlined - mount-helper: - fix `--type=<type>` flag never having worked - can now unmount sources and types without targets - can now unmount the alternative targets of a source - cleanup parse/dump output - fix gocryptfs not getting fuse config when necessary - fix noisy and confusing get-devices output - improved unmount handling to support cases where the intended unmount was done by a user/group that wasn't intended - better clarity about what we are performign actions on - only output fstab/cron details when desired - correct usage of grep/ripgrep - correct and more details unmount handling under more variations of check statuses - correct handling of unmount aborts in more contexts - secret: - correct modern detection of login and prevent login details being output with values - setup-linux-fonts: - fix source-code-pro - setup-util: - add --no-xdg support - setup-util-gocryptfs: - use --no-xdg to ensure that mounting under specific users/groups works - ssh-helper: - use `is-abort` - sudo-helper: - clean output on --local - setup-server: - ensure gocryptfs is configure correctly - bash.bash: - add aliases for various flags for clearer usage
- Loading branch information
Showing
17 changed files
with
557 additions
and
260 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,20 +21,20 @@ actions: | |
lint: | ||
enabled: | ||
- [email protected] | ||
- black@23.12.1 | ||
- checkov@3.1.69 | ||
- black@24.1.1 | ||
- checkov@3.2.3 | ||
- [email protected] | ||
- [email protected] | ||
- git-diff-check@SYSTEM | ||
- [email protected] | ||
- [email protected] | ||
- markdownlint@0.38.0 | ||
- markdownlint@0.39.0 | ||
- [email protected] | ||
- [email protected].14 | ||
- [email protected].15 | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] | ||
- trufflehog@3.63.11 | ||
- trufflehog@3.66.3 | ||
- [email protected] | ||
disabled: | ||
- trivy | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
#!/usr/bin/env bash | ||
|
||
function is_abort() ( | ||
source "$DOROTHY/sources/bash.bash" | ||
|
||
# ===================================== | ||
# Arguments | ||
|
||
function help { | ||
cat <<-EOF >/dev/stderr | ||
ABOUT: | ||
Check if <input> is an abort exit status | ||
USAGE: | ||
is-abort [...options] [--] ...<input> | ||
OPTIONS: | ||
<input> | ||
Input to check is an abort value. | ||
--ignore-empty: | ||
Ignore/skip empty values. | ||
ABORTS: | ||
125: ECANCELED 125 Operation cancelled | ||
129: SIGHUP (Hangup signal. Sent to a process when its controlling terminal is closed.) | ||
130: SIGINT (Interrupt signal. Sent to interrupt the process and typically initiated by pressing Ctrl+C.) | ||
131: SIGQUIT (Quit signal. Similar to SIGINT but typically results in a core dump for debugging.) | ||
134: SIGABRT (Abort signal. Sent by the process to itself when it detects a critical error.) | ||
137: SIGKILL (Kill signal. Sent to forcefully terminate a process. Cannot be caught or ignored.) | ||
143: SIGTERM (Termination signal. Sent to request a process to terminate gracefully.) | ||
RETURNS: | ||
[0] if ANY <input>s were an abort | ||
[1] if ALL <input> were not abort | ||
EOF | ||
if test "$#" -ne 0; then | ||
echo-error "$@" | ||
fi | ||
return 22 # EINVAL 22 Invalid argument | ||
} | ||
|
||
# process | ||
local item option_inputs=() option_ignore_empty='no' | ||
while test "$#" -ne 0; do | ||
item="$1" | ||
shift | ||
case "$item" in | ||
'--help' | '-h') help ;; | ||
'--no-ignore-empty'* | '--ignore-empty'*) | ||
option_ignore_empty="$(get-flag-value --abort --fallback="$option_ignore_empty" -- "$item")" | ||
;; | ||
'--') | ||
option_inputs+=("$@") | ||
shift "$#" | ||
break | ||
;; | ||
'--'*) help "An unrecognised flag was provided: $item" ;; | ||
'') ;; # ignore empty values | ||
*) option_inputs+=("$item") ;; | ||
esac | ||
done | ||
|
||
# ===================================== | ||
# Action | ||
|
||
local input | ||
for input in "${option_inputs[@]}"; do | ||
case "$input" in | ||
125 | 129 | 130 | 131 | 134 | 137 | 143) return 0 ;; | ||
esac | ||
done | ||
return 1 | ||
) | ||
|
||
# fire if invoked standalone | ||
if test "$0" = "${BASH_SOURCE[0]}"; then | ||
is_abort "$@" | ||
fi |
Oops, something went wrong.