/ ok then, are we done now?

This commit is contained in:
committer@tuxwarrior
2024-08-27 16:29:56 -05:00
parent 5d5f8d9f51
commit fe71d5244d

View File

@@ -79,24 +79,17 @@ deploy_file() {
echo ""
echo "${file_name_trg}:"
echo "<!> _src_path: ${_src_path}"
echo "<!> _trg_path: ${_trg_path}"
echo "<!> file_name_src: ${file_name_src}"
echo "<!> file_name_trg: ${file_name_trg}"
suffix1=".zip"
suffix2=".tar.xz"
if [[ ${file_name_src} == *$suffix1 ]] ; then
echo "unzipping ${file_name_src}"
echo "unzipping '${_src_path}'"
# -o: overwrite without prompting
echo "<!> _src_path: ${_src_path}"
echo "<!> _trg_path: ${_trg_path}"
unzip -o ${_src_path} -d ${_trg_path}
elif [[ ${file_name_src} == *$suffix2 ]] ; then
echo "un-taring ${file_name_src}"
echo "un-taring '${_src_path}'"
tar -xf ${_src_path} -C ${_trg_path}
else
echo "copying ${_src_path}"
echo "copying '${_src_path}'"
# -f (--force): overwrite without confirmation
cp --force --recursive ${_src_path} ${_trg_path}
fi