2023-04-19 16:04:25 -04:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# usage:
|
|
|
|
#
|
|
|
|
# sudo ./sync
|
|
|
|
# sudo ./sync gentoo
|
|
|
|
|
|
|
|
set -eu
|
|
|
|
|
|
|
|
REPO="$(dirname "$(realpath "$0")")"
|
|
|
|
|
|
|
|
PREFIX="${1:-''}"
|
|
|
|
|
2023-06-19 11:55:58 -04:00
|
|
|
install_dir() {
|
|
|
|
true
|
|
|
|
}
|
|
|
|
|
|
|
|
install_file() {
|
|
|
|
path="$4"
|
|
|
|
prefix="$5"
|
2023-04-19 16:04:25 -04:00
|
|
|
|
|
|
|
if [ -f "$path" ]; then
|
|
|
|
echo cp "$path" "$REPO/$prefix$path"
|
|
|
|
cp "$path" "$REPO/$prefix$path"
|
|
|
|
else
|
|
|
|
echo "Not found: $path"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2023-06-19 11:55:58 -04:00
|
|
|
. "$REPO/files.sh"
|