Skip to content

Commit

Permalink
Adding back upload loop to test full script
Browse files Browse the repository at this point in the history
  • Loading branch information
JS Fillman committed May 1, 2024
1 parent 045bd78 commit 07e1972
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/zip2cloud
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ done
uploads=""
cd ${ZIP_DIR} || exit
for file in ${ZIP_DIR}/*.7z; do
echo "Comparing $file with remote"
echo "Comparing $file with all remote md5s"
# Get the base name of the file without extension
base_name=$(basename "$file" .7z)
local_md5=$(md5sum "$file" | awk '{print $1}')
Expand All @@ -80,8 +80,10 @@ for file in ${ZIP_DIR}/*.7z; do
match_found=0
for remote_md5_file in ${ZIP_DIR}/tmp_md5/*.md5; do
remote_md5=$(cat "$remote_md5_file")
echo "Comparing $file with $remote_md5_file"
if [ "$local_md5" = "$remote_md5" ]; then
match_found=1
echo "$file checksum matches $remote_md5_file, skipping"
break
fi
done
Expand Down Expand Up @@ -204,8 +206,8 @@ done
cd ${ZIP_DIR} || exit
for file in ${final_uploads}; do
echo "RClone-ing ${file} to GCP ${REMOTE}"
echo "Not actually cloning ${file}, just testing"
# /bin/rclone sync -v "$file" ${REMOTE}/
# echo "Not actually cloning ${file}, just testing"
/bin/rclone sync -v "$file" ${REMOTE}/
done

### End Upload

0 comments on commit 07e1972

Please sign in to comment.