tmux, bash, mgmt fiddling

This commit is contained in:
Robert Perce 2026-03-25 10:50:18 -05:00
parent 6649cfc78d
commit c653422734
11 changed files with 160 additions and 11 deletions

View file

@ -0,0 +1,17 @@
# shellcheck shell=bash
install_bin() {
name="$1"
file="$2"
source="$3"
flag="$4"
if file "$file" | grep -Eqv 'ELF|executable'; then
diag "$(red "error: file from $source not an executable")"
exit 1
fi
if [ "$flag" != "--no-backup" ] && [ -f "/usr/local/bin/$name" ]; then
sudo cp "/usr/local/bin/$name" "/usr/local/bin/$name.old"
fi
sudo install -m 755 "$file" "/usr/local/bin/$name"
}