From 2bfc39f3f7a1ace3e50d672be36a90d1170601b0 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sat, 4 Jul 2020 22:07:25 +0200 Subject: [PATCH] scripts: generate_manifest: remove obsolete manifest lines (#2067) The current manifest format was introduced with the new autoupdater in Gluon v2018.1. Reduce the manifest size by 70% by removing the additional manifest lines added for backwards compatiblity. --- scripts/generate_manifest.lua | 3 --- scripts/sha512sum.sh | 20 -------------------- 2 files changed, 23 deletions(-) delete mode 100755 scripts/sha512sum.sh diff --git a/scripts/generate_manifest.lua b/scripts/generate_manifest.lua index e289412e..efeac489 100755 --- a/scripts/generate_manifest.lua +++ b/scripts/generate_manifest.lua @@ -20,11 +20,8 @@ local function generate_line(model, dir, filename, filesize) end local file256sum = strip(lib.exec_capture {'scripts/sha256sum.sh', dir..'/'..filename}) - local file512sum = strip(lib.exec_capture {'scripts/sha512sum.sh', dir..'/'..filename}) io.stdout:write(string.format('%s %s %s %s %s\n', model, env.GLUON_RELEASE, file256sum, filesize, filename)) - io.stdout:write(string.format('%s %s %s %s\n', model, env.GLUON_RELEASE, file256sum, filename)) - io.stdout:write(string.format('%s %s %s %s\n', model, env.GLUON_RELEASE, file512sum, filename)) end local function generate(image) diff --git a/scripts/sha512sum.sh b/scripts/sha512sum.sh deleted file mode 100755 index cb4b07e4..00000000 --- a/scripts/sha512sum.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh - -check_command() { - command -v "$1" >/dev/null 2>&1 -} - -if check_command sha512sum; then - ret="$(sha512sum "$@")" -elif check_command shasum; then - ret="$(shasum -a 512 "$@")" -elif check_command cksum; then - ret="$(cksum -q -a sha512 "$@")" -else - echo "$0: no suitable sha512sum implementation was found" >&2 - exit 1 -fi - -[ "$?" -eq 0 ] || exit 1 - -echo "$ret" | awk '{ print $1 }'