Skip to content

Instantly share code, notes, and snippets.

@chantra
Created March 23, 2022 19:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chantra/5d5f21bf0057b5cfb7e6eb4aa835fe6d to your computer and use it in GitHub Desktop.
Save chantra/5d5f21bf0057b5cfb7e6eb4aa835fe6d to your computer and use it in GitHub Desktop.
diff --git a/lookaside_upload b/lookaside_upload
index 05dfae4..9125f98 100755
--- a/lookaside_upload
+++ b/lookaside_upload
@@ -76,7 +76,7 @@ if [ ! -f "${file}" ] ;then
exit 2
fi
-checksum=$(sha1sum ${file}|awk '{print $1}')
+checksum=$(sha512sum ${file}|awk '{print $1}')
f_log "Checking if file already uploaded"
local_size=$(stat -c %s ${file})
@@ -91,7 +91,7 @@ f_log "Initialing new upload to lookaside"
f_log "URL : $lookaside_baseurl"
f_log "Source to upload : ${file} "
f_log "Package name: $pkgname"
-f_log "sha1sum: ${checksum}"
+f_log "sha512sum: ${checksum}"
f_log "Remote branch: ${branch}"
f_log " ====== Trying to upload ======="
echo ""
@@ -100,7 +100,7 @@ curl ${lookaside_baseurl}/sources/upload.cgi \
--cert ~/.centos.cert \
--form "name=${pkgname}" \
--form "branch=${branch}" \
- --form "sha1sum=${checksum}" \
+ --form "sha512sum=${checksum}" \
--form "file=@${file}" \
--progress-bar | tee /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment