1
0
Fork 0
dotfiles/install

43 lines
696 B
Text
Raw Permalink Normal View History

2023-04-19 15:46:44 -04:00
#!/bin/sh
# usage:
#
# sudo ./install
# sudo ./install gentoo
#
# env vars:
#
# VERSION_CONTROL
# SIMPLE_BACKUP_SUFFIX
#
# see man install(1)
set -eu
REPO="$(dirname "$(realpath "$0")")"
PREFIX="${1:-''}"
install_file() {
2024-01-05 15:51:35 -05:00
prefix="$1"
owner="$2"
group="$3"
mode="$4"
path="$5"
2023-04-19 15:46:44 -04:00
echo install -b -o "$owner" -g "$group" -m "$mode" "$REPO/$prefix$path" "$path"
install -b -o "$owner" -g "$group" -m "$mode" "$REPO/$prefix$path" "$path"
}
install_dir() {
owner="$1"
group="$2"
mode="$3"
path="$4"
echo install -o "$owner" -g "$group" -m "$mode" -d "$path"
install -o "$owner" -g "$group" -m "$mode" -d "$path"
}
2023-06-19 11:55:58 -04:00
. "$REPO/files.sh"