-
Notifications
You must be signed in to change notification settings - Fork 0
/
s_distro_post
executable file
·60 lines (46 loc) · 2.04 KB
/
s_distro_post
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/usr/bin/env bash
#
# Bin is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Bin is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Bin. If not, see <https://www.gnu.org/licenses/>.
#
# Description: Configure/Install distro independent software
s_echo "Post Install"
paste() {
command=$1
to=$2
[[ ! -f $to ]] && return
if [[ ! $(grep -rni "$command" "$to") ]]; then
echo "[[ -f $command ]] && $command" >>$to
fi
}
paste 'source $HOME/.config/bash/aliases.bash' "$HOME/.bashrc"
paste 'source $HOME/.config/bash/functions.bash' "$HOME/.bashrc"
paste 'source $HOME/.config/bash/config.bash' "$HOME/.bashrc"
paste 'source $HOME/.config/bash/profile.bash' "$HOME/.bash_profile"
# export to bash --user environment.d confs
paste 'export $(/usr/lib/systemd/user-environment-generators/30-systemd-environment-d-generator | xargs)' "$HOME/.profile"
# default folders
mkdir -pv "$HOME"/{Downloads,Pictures,Documents,Videos,Builds,Projects,.local/bin,.config/scripts}
# silent parallel, for good.
[[ -x $(command -v parallel) ]] && parallel --citation
# Add Flathub Repository
[[ -x $(command -v flatpak) ]] && sudo flatpak remote-add --if-not-exists \
flathub https://flathub.org/repo/flathub.flatpakrepo
# cache all system fonts
sudo fc-cache -fv
# create or update the manual page index caches
sudo mandb
sudo usermod -a -G video,bluetooth,input "$USER"
[[ $(command -v mpd) ]] && mkdir -pv "$HOME"/mpd/playlists
[[ -f /da/personal/dut/main.py ]] && ln -sf /da/personal/dut/main.py "$HOME/.local/bin/dut"
[[ -f /da/personal/gota/main.py ]] && ln -sf /da/personal/gota/main.py "$HOME/.local/bin/gota"