Merge branch 'main' of git.snaile.de:luca/bootstrapper
This commit is contained in:
commit
0e1fc44416
|
@ -146,10 +146,14 @@ create_directories() {
|
||||||
_loop_wrapper "${SCRIPT_DIR}/directories.txt" \
|
_loop_wrapper "${SCRIPT_DIR}/directories.txt" \
|
||||||
'Creating directory $(echo $x | cut -d"," -f1)' \
|
'Creating directory $(echo $x | cut -d"," -f1)' \
|
||||||
'
|
'
|
||||||
|
set -e
|
||||||
dir=$(echo $x | cut -d"," -f1)
|
dir=$(echo $x | cut -d"," -f1)
|
||||||
mod=$(echo $x | cut -d"," -f2)
|
mod=$(echo $x | cut -d"," -f2)
|
||||||
|
[ "$dir" = "$mod" ] && mod="755"
|
||||||
|
[ -d "${user_home}/${dir}" ] || mkdir -p "${user_home}/${dir}"
|
||||||
sudo -u "$username" mkdir -p "${user_home}/${dir}"
|
sudo -u "$username" mkdir -p "${user_home}/${dir}"
|
||||||
chmod "${mod}" "${user_home}/${dir}"
|
chmod "${mod}" "${user_home}/${dir}"
|
||||||
|
set +e
|
||||||
'
|
'
|
||||||
info "Done!"
|
info "Done!"
|
||||||
}
|
}
|
||||||
|
@ -191,6 +195,7 @@ enable_services() {
|
||||||
finalize() {
|
finalize() {
|
||||||
gid=$(getent passwd "$username" | cut -d ':' -f 4)
|
gid=$(getent passwd "$username" | cut -d ':' -f 4)
|
||||||
groupname=$(getent group "$gid" | cut -d ':' -f 1)
|
groupname=$(getent group "$gid" | cut -d ':' -f 1)
|
||||||
|
info "Setting ownership of home directories..."
|
||||||
chown "$username:$groupname" -R "$user_home"
|
chown "$username:$groupname" -R "$user_home"
|
||||||
info "Done!"
|
info "Done!"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
.cache,755
|
.cache
|
||||||
.config
|
.config
|
||||||
.config/dwm/autorun.d,755
|
.config/dwm/autorun.d
|
||||||
.local/libexec/,755
|
.local/libexec/
|
||||||
.local/log,755
|
.local/log
|
||||||
.local/share/,755
|
.local/share/
|
||||||
.local/state,755
|
.local/state
|
||||||
.local/sv,755
|
.local/sv
|
||||||
|
Desktop
|
||||||
|
Documents/dev
|
||||||
|
Downloads
|
||||||
|
Pictures/Screenshots
|
||||||
|
Videos
|
||||||
.ssh,700
|
.ssh,700
|
||||||
Desktop,755
|
|
||||||
Documents/dev,755
|
|
||||||
Downloads,755
|
|
||||||
Pictures/Screenshots,755
|
|
||||||
Videos,755
|
|
||||||
|
|
Loading…
Reference in New Issue