/ fix of permission issue

This commit is contained in:
committer
2024-08-25 19:17:32 -05:00
parent 172062c267
commit fd5e8b170f

View File

@@ -60,6 +60,8 @@ download_repo() {
create_dir() {
_directory=$1
# runuser -l ${system_user} -c 'mkdir -p ${_directory}'
mkdir -p ${_directory}
chown ${system_user}:${system_user} ${_directory}
}
@@ -87,7 +89,7 @@ deploy_file() {
cp --force --recursive ${_src_path} ${_trg_path}
fi
# only chown if _no_chown variable is empty
# chown by default
if [[ ${_no_chown} != "no_chown" ]] ; then
# if the target path ends with a slash, we have a directory
if [[ "$_trg_path" == */ ]]
@@ -262,13 +264,13 @@ if [ ${operation} == "dots" ] ; then
# dunst
file_name=dunstrc
file_path=/home/${system_user}/.config/dunst
mkdir -p ${file_path}
create_dir(${file_path})
deploy_file "${dots_trg}/dunst/${file_name}" "${file_path}/${file_name}"
# lf
file_name=lfrc
file_path=/home/${system_user}/.config/lf
mkdir -p ${file_path}
create_dir(${file_path})
deploy_file "${dots_trg}/lf/${file_name}" "${file_path}/${file_name}"
# firefox
@@ -286,7 +288,7 @@ if [ ${operation} == "dots" ] ; then
file_name=userChrome.css
file_path=${ffpd}/chrome
mkdir -p ${file_path}
create_dir(${file_path})
deploy_file "${dots_trg}/firefox/${file_name}" "${file_path}/${file_name}"
fi
@@ -296,7 +298,7 @@ if [ ${operation} == "dots" ] ; then
# ".gtkrc-2.0" is overwritten
file_name=settings.ini
file_path=/home/${system_user}/.config/gtk-3.0
mkdir -p ${file_path}
create_dir(${file_path})
deploy_file "${dots_trg}/gtk/${file_name}" "${file_path}/${file_name}"
file_name=.gtk-bookmarks
@@ -312,7 +314,7 @@ if [ ${operation} == "dots" ] ; then
file_name=index.theme
file_path=/home/${system_user}/.icons/default
mkdir -p ${file_path}
create_dir(${file_path})
deploy_file "${dots_trg}/gtk/${file_name}" "${file_path}/${file_name}"
# helix
@@ -322,20 +324,20 @@ if [ ${operation} == "dots" ] ; then
# nitrogen
file_path=/home/${system_user}/.config/nitrogen
mkdir -p ${file_path}
create_dir(${file_path})
deploy_file "${dots_trg}/nitrogen/*" "${file_path}/"
# pcmanfm
# bookmarks found in "dots/gtk/.gtk-bookmarks"
file_name=pcmanfm.conf
file_path=/home/${system_user}/.config/pcmanfm/default
mkdir -p ${file_path}
create_dir(${file_path})
deploy_file "${dots_trg}/pcmanfm/${file_name}" "${file_path}/${file_name}"
# vscodium
file_name=settings.json
file_path=/home/${system_user}/.config/VSCodium/User
mkdir -p ${file_path}
create_dir(${file_path})
deploy_file "${dots_trg}/vscodium/${file_name}" "${file_path}/${file_name}"
# i3wm
@@ -344,13 +346,13 @@ if [ ${operation} == "dots" ] ; then
# i3
file_name=config
file_path=/home/${system_user}/.config/i3
mkdir -p ${file_path}
create_dir(${file_path})
deploy_file "${dots_trg}/i3wm/${file_name}" "${file_path}/"
# i3status
file_name=config
file_path=/home/${system_user}/.config/i3status
mkdir -p ${file_path}
create_dir(${file_path})
deploy_file "${dots_trg}/i3status/${file_name}" "${file_path}/"
fi
@@ -398,21 +400,21 @@ if [ ${operation} == "dots+" ] ; then
# fonts
# ----------
file_path=/home/${system_user}/.local/share/fonts
mkdir -p ${file_path}
create_dir(${file_path})
deploy_file "${dotsplus_trg}/fonts/install/*" "${file_path}/"
# ----------
# images
# ----------
file_path=/home/${system_user}/.local/share/img
mkdir -p ${file_path}
create_dir(${file_path})
deploy_file "${dotsplus_trg}/images/*" "${file_path}/"
# ----------
# wallpapers
# ----------
file_path=/home/${system_user}/.local/share/wp
mkdir -p ${file_path}
create_dir(${file_path})
deploy_file "${dotsplus_trg}/wallpapers/install/*" "${file_path}/"
# ----------
@@ -424,7 +426,7 @@ if [ ${operation} == "dots+" ] ; then
# https://github.com/sdras/night-owl-vscode-theme/tree/main/themes
file_name=night-owl-vscode-theme-main.zip
file_path=/home/${system_user}/.vscode-oss/extensions
mkdir -p ${file_path}
create_dir(${file_path})
deploy_file "${dotsplus_trg}/miscellaneous/${file_name}" "${file_path}/" chown recursive
# sweet dark gtk theme
@@ -438,7 +440,7 @@ if [ ${operation} == "dots+" ] ; then
# chowning
# ----------
share_dir=/home/${system_user}/.local/share
mkdir -p ${share_dir}
create_dir(${file_path})
chown ${system_user}:${system_user} ${share_dir}
chown ${system_user}:${system_user} ${share_dir}/*