+ env & bin deployment
This commit is contained in:
@@ -56,12 +56,16 @@ create_dir() {
|
|||||||
deploy_file() {
|
deploy_file() {
|
||||||
_src_path=$1
|
_src_path=$1
|
||||||
_trg_path=$2
|
_trg_path=$2
|
||||||
|
_no_chown=$3
|
||||||
|
|
||||||
cp -f ${_src_path} ${_trg_path}
|
cp -f ${_src_path} ${_trg_path}
|
||||||
chown ${user}:${user} ${_trg_path}
|
|
||||||
|
# only chown if _no_chown variable is empty
|
||||||
|
if [ -z "${_no_chown}" ]; then
|
||||||
|
chown ${user}:${user} ${_trg_path}
|
||||||
|
fi
|
||||||
|
|
||||||
file_name=$(basename ${_trg_path})
|
file_name=$(basename ${_trg_path})
|
||||||
|
|
||||||
suffix=".sh"
|
suffix=".sh"
|
||||||
if [[ ${file_name} == *$suffix ]]; then
|
if [[ ${file_name} == *$suffix ]]; then
|
||||||
chmod 755 ${_trg_path}
|
chmod 755 ${_trg_path}
|
||||||
@@ -82,6 +86,14 @@ if [ ${operation} == "dots" ] ; then
|
|||||||
download_repo ${targz_dots_url}
|
download_repo ${targz_dots_url}
|
||||||
tree ${clone_trg}/lnx-arch
|
tree ${clone_trg}/lnx-arch
|
||||||
|
|
||||||
|
# bin (executable binaries, scripts)
|
||||||
|
file_path=/usr/local/bin
|
||||||
|
deploy_file "${dots_trg}/bin/*" "${file_path}/${file_name}"
|
||||||
|
|
||||||
|
# environment
|
||||||
|
file_path=/etc/
|
||||||
|
deploy_file "${dots_trg}/bin/*" "${file_path}/${file_name}" no_chown
|
||||||
|
|
||||||
# hypridle
|
# hypridle
|
||||||
file_name=hypridle.conf
|
file_name=hypridle.conf
|
||||||
file_path=/home/${user}/.config/hypr
|
file_path=/home/${user}/.config/hypr
|
||||||
@@ -97,11 +109,6 @@ if [ ${operation} == "dots" ] ; then
|
|||||||
file_path=/home/${user}/.config/hypr
|
file_path=/home/${user}/.config/hypr
|
||||||
deploy_file ${dots_trg}/hyprpaper/${file_name} ${file_path}/${file_name}
|
deploy_file ${dots_trg}/hyprpaper/${file_name} ${file_path}/${file_name}
|
||||||
|
|
||||||
# startup.sh
|
|
||||||
file_name=startup.sh
|
|
||||||
file_path=/usr/local/bin
|
|
||||||
deploy_file ${dots_trg}/startup/${file_name} ${file_path}/${file_name}
|
|
||||||
|
|
||||||
# waybar
|
# waybar
|
||||||
file_path=/home/${user}/.config/waybar
|
file_path=/home/${user}/.config/waybar
|
||||||
mkdir -p ${file_path}
|
mkdir -p ${file_path}
|
||||||
|
|||||||
Reference in New Issue
Block a user