This commit is contained in:
committer@tuxwarrior
2024-08-27 16:27:45 -05:00
parent a1c90d411f
commit 5d5f8d9f51

View File

@@ -71,7 +71,7 @@ deploy_file() {
_no_chown=$3
_recursive=$4
if [[ "$_src_path" == *.zip ]] ; then
if [[ "$_src_path" == *.zip ]] || [[ "$_src_path" == *.tar.xz ]] ; then
file_name_src=$(basename ${_src_path})
fi
@@ -87,13 +87,16 @@ deploy_file() {
suffix1=".zip"
suffix2=".tar.xz"
if [[ ${file_name_src} == *$suffix1 ]] ; then
echo "unzipping ${file_name_src}"
# -o: overwrite without prompting
echo "_src_path: ${_src_path}"
echo "_trg_path: ${_trg_path}"
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}"
tar -xf ${_src_path} -C ${_trg_path}
else
echo "copying ${_src_path}"
# -f (--force): overwrite without confirmation
cp --force --recursive ${_src_path} ${_trg_path}
fi