1
0
Fork 0
dotfiles/install

43 lines
696 B
Text
Raw 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() {
owner="$1"
group="$2"
mode="$3"
path="$4"
prefix="$5"
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"