aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2024-05-09 15:28:30 -0300
committerEuAndreh <eu@euandre.org>2024-05-09 15:28:30 -0300
commit2b22a59433fd7cdf87bf17cb96bb725c85cc22a3 (patch)
treee8af44966853cbd428ead489c23ce0f86a31f945
parentbin/statusconv: Move to eut (diff)
downloaddotfiles-2b22a59433fd7cdf87bf17cb96bb725c85cc22a3.tar.gz
dotfiles-2b22a59433fd7cdf87bf17cb96bb725c85cc22a3.tar.xz
bin/nicely: Muve to its own dedicated package
-rwxr-xr-xbin/nicely67
1 files changed, 0 insertions, 67 deletions
diff --git a/bin/nicely b/bin/nicely
deleted file mode 100755
index d062f02..0000000
--- a/bin/nicely
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/bin/sh
-set -eu
-
-usage() {
- cat <<-'EOF'
- Usage:
- nicely COMMAND...
- nicely -h
- EOF
-}
-
-help() {
- cat <<-'EOF'
-
-
- Options:
- -h, --help show this message
-
- COMMAND the command to be wrapped
-
-
- Wrap COMMAND in nice(1) and ionice(1) calls, so that it gets low
- priority from the OS scheduler and has low disturbance regarding
- CPU usage and disk IO bandwidth.
-
-
- Examples:
-
- Make the backup low priority:
-
- $ nicely backup
- EOF
-}
-
-
-for flag in "$@"; do
- case "$flag" in
- (--)
- break
- ;;
- (--help)
- usage
- help
- exit
- ;;
- (*)
- ;;
- esac
-done
-
-while getopts 'h' flag; do
- case "$flag" in
- (h)
- usage
- help
- exit
- ;;
- (*)
- usage >&2
- exit 2
- ;;
- esac
-done
-shift $((OPTIND - 1))
-
-
-ionice -c3 nice -n19 "$@"