1
0
Fork 0

Single file list

This commit is contained in:
Alex Kotov 2023-06-19 19:55:58 +04:00
parent cdfe7f6d66
commit 9c90191d10
3 changed files with 40 additions and 53 deletions

31
files.sh Normal file
View file

@ -0,0 +1,31 @@
install_file root root 644 '/etc/tmux.conf' common
echo
install_dir root root 755 '/etc/vim'
install_file root root 644 '/etc/vim/vimrc.local' common
echo
install_dir root root 755 '/etc/fish'
install_dir root root 755 '/etc/fish/conf.d'
install_dir root root 755 '/etc/fish/functions'
install_file root root 644 '/etc/fish/config.fish' common
install_file root root 644 '/etc/fish/conf.d/rvm.fish' common
install_file root root 644 '/etc/fish/functions/fish_prompt.fish' common
install_file root root 644 '/etc/fish/functions/prompt_user_host.fish' common
install_file root root 644 '/etc/fish/functions/rvm.fish' common
if [ "$PREFIX" = 'gentoo' ]; then
echo
install_file root root 644 '/etc/conf.d/display-manager' gentoo
install_file root root 644 '/etc/env.d/90xsession' gentoo
install_file root portage 644 '/var/lib/portage/world' gentoo
echo
install_dir root root 755 '/etc/portage/package.accept_keywords'
install_dir root root 755 '/etc/portage/package.mask'
install_dir root root 755 '/etc/portage/package.use'
install_file root root 644 '/etc/portage/make.conf' gentoo
install_file root root 644 '/etc/portage/package.license' gentoo
install_file root root 644 '/etc/portage/package.accept_keywords/package.accept_keywords' gentoo
install_file root root 644 '/etc/portage/package.mask/toolchains' gentoo
install_file root root 644 '/etc/portage/package.use/pluma' gentoo
install_file root root 644 '/etc/portage/package.use/toolchains' gentoo
install_file root root 644 '/etc/portage/package.use/zz-autounmask' gentoo
fi

32
install
View file

@ -39,34 +39,4 @@ install_dir() {
install -o "$owner" -g "$group" -m "$mode" -d "$path"
}
install_file root root 644 '/etc/tmux.conf' common
echo
install_dir root root 755 '/etc/vim'
install_file root root 644 '/etc/vim/vimrc.local' common
echo
install_dir root root 755 '/etc/fish'
install_dir root root 755 '/etc/fish/conf.d'
install_dir root root 755 '/etc/fish/functions'
install_file root root 644 '/etc/fish/config.fish' common
install_file root root 644 '/etc/fish/conf.d/rvm.fish' common
install_file root root 644 '/etc/fish/functions/fish_prompt.fish' common
install_file root root 644 '/etc/fish/functions/prompt_user_host.fish' common
install_file root root 644 '/etc/fish/functions/rvm.fish' common
if [ "$PREFIX" = 'gentoo' ]; then
echo
install_file root root 644 '/etc/conf.d/display-manager' gentoo
install_file root root 644 '/etc/env.d/90xsession' gentoo
install_file root portage 644 '/var/lib/portage/world' gentoo
echo
install_dir root root 755 '/etc/portage/package.accept_keywords'
install_dir root root 755 '/etc/portage/package.mask'
install_dir root root 755 '/etc/portage/package.use'
install_file root root 644 '/etc/portage/make.conf' gentoo
install_file root root 644 '/etc/portage/package.license' gentoo
install_file root root 644 '/etc/portage/package.accept_keywords/package.accept_keywords' gentoo
install_file root root 644 '/etc/portage/package.mask/toolchains' gentoo
install_file root root 644 '/etc/portage/package.use/pluma' gentoo
install_file root root 644 '/etc/portage/package.use/toolchains' gentoo
install_file root root 644 '/etc/portage/package.use/zz-autounmask' gentoo
fi
. "$REPO/files.sh"

30
sync
View file

@ -11,9 +11,13 @@ REPO="$(dirname "$(realpath "$0")")"
PREFIX="${1:-''}"
sync() {
prefix="$1"
path="$2"
install_dir() {
true
}
install_file() {
path="$4"
prefix="$5"
if [ -f "$path" ]; then
echo cp "$path" "$REPO/$prefix$path"
@ -23,22 +27,4 @@ sync() {
fi
}
sync common '/etc/tmux.conf'
sync common '/etc/vim/vimrc.local'
sync common '/etc/fish/config.fish'
sync common '/etc/fish/conf.d/rvm.fish'
sync common '/etc/fish/functions/fish_prompt.fish'
sync common '/etc/fish/functions/prompt_user_host.fish'
sync common '/etc/fish/functions/rvm.fish'
if [ "$PREFIX" = 'gentoo' ]; then
echo
sync gentoo '/var/lib/portage/world'
sync gentoo '/etc/portage/make.conf'
sync gentoo '/etc/portage/package.license'
sync gentoo '/etc/portage/package.accept_keywords/package.accept_keywords'
sync gentoo '/etc/portage/package.mask/toolchains'
sync gentoo '/etc/portage/package.use/pluma'
sync gentoo '/etc/portage/package.use/toolchains'
sync gentoo '/etc/portage/package.use/zz-autounmask'
fi
. "$REPO/files.sh"