mirror of
https://github.com/keanuplayz/dotfiles.git
synced 2024-08-15 02:33:12 +00:00
28 lines
717 B
Bash
28 lines
717 B
Bash
# Maintainer: Dmytro Meleshko <dmytro.meleshko@gmail.com>
|
|
pkgname=dmitmel-dotfiles
|
|
pkgver=0
|
|
pkgrel=1
|
|
pkgdesc="dmitmel's dotfiles"
|
|
arch=('any')
|
|
url="https://github.com/dmitmel/dotfiles"
|
|
license=('MIT')
|
|
backup=()
|
|
|
|
package() {
|
|
cd "$(dirname "${BASH_SOURCE[0]}")/../files"
|
|
install -Dm644 ../../LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
|
|
_install_files *
|
|
}
|
|
|
|
_install_files() {
|
|
local path real_path mode; for path in "$@"; do
|
|
real_path="$(realpath "$path")"
|
|
mode="$(stat --format "%a" "$real_path")"
|
|
if [[ -d "$path" ]]; then
|
|
install --directory --mode "$mode" "$pkgdir/$path"
|
|
_install_files "$path"/*
|
|
else
|
|
install --mode "$mode" "$real_path" "$pkgdir/$path"
|
|
fi
|
|
done
|
|
}
|