This repository has been archived on 2024-03-04. You can view files and clone it, but cannot push or open issues or pull requests.
linux/.config/bash/module/Bootstrap.sh

45 lines
1 KiB
Bash
Raw Normal View History

2023-12-17 19:44:49 +03:00
# Install Editorconfig file (with tabs) in current directory.
function bootstrap_editorconfig() {
echo "\
[*]
end_of_line = lf
charset = utf-8
indent_style = tab
insert_final_newline = true
trim_trailing_whitespace = true
" > .editorconfig
}
# Install Editorconfig file (with specified spaces, 8 by default) in current directory.
# Usage: bootstrap_editorconfig_space [AMOUNT]
function bootstrap_editorconfig_space() {
local spaces="${1}"
[[ "${spaces}" = "" ]] && spaces=8
echo "\
[*]
end_of_line = lf
charset = utf-8
indent_style = space
indent_size = ${spaces}
insert_final_newline = true
trim_trailing_whitespace = true
" > .editorconfig
}
# Setup all the flatpak apps on the machine.
function bootstrap_flatpak() {
# Add Flathub repo.
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
# Reinstall apps.
local IFS=$'\n'
local targets="$(cat ~/.config/linux/Flatpak.txt | cut -f2)"
process() {
2024-02-13 15:19:10 +03:00
flatpak install -y --system "${target}"
}
_iterate_targets process ${targets[@]}
2024-01-25 00:49:29 +03:00
}