+ deploy rclone config

plus better naming of gpg key deployer script
This commit is contained in:
committer@tuxwarrior
2026-04-04 12:29:03 -05:00
parent d75dfeeb50
commit 98773d3221
3 changed files with 34 additions and 1 deletions

32
dots/bin/deployRcloneCfg.sh Executable file
View File

@@ -0,0 +1,32 @@
#!/usr/bin/env bash
# klevstul :: 26.04
this_file_name=`basename "$0"`
echo "$this_file_name"
# source config file
src_file=/home/${USER}/syncDir/secrets/rclone/rclone.conf
if ! [[ -f ${src_file} ]]; then
echo "error: non-existing file '${src_file}'" >&2; exit 1
fi
# target directory
trg_dir=/home/${USER}/.config/rclone
if ! [[ -d "$trg_dir" ]]; then
echo "creating non-existing target dir '${trg_dir}'."
mkdir -p ${trg_dir}
fi
# copy from source to target if source does not exist
files=$(shopt -s nullglob dotglob; echo ${trg_dir}/*.conf)
if (( ${#files} ))
then
echo "*.conf file(s) already exist in ${trg_dir}"
else
echo "deploy .conf file(s)"
cp ${src_file} ${trg_ssh_dir}
fi
ls -al ${trg_dir}