From 366567bacfebdb642bbbc6e66306c3c5a17ad20e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Tue, 27 Mar 2018 15:49:07 +0200 Subject: [PATCH] Add script to update the file hash in oneliner --- hack/update_oneline_install.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 hack/update_oneline_install.sh diff --git a/hack/update_oneline_install.sh b/hack/update_oneline_install.sh new file mode 100755 index 0000000..90bc49e --- /dev/null +++ b/hack/update_oneline_install.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +if [ "$(uname)" == "Darwin" ]; then + readlink_cmd="greadlink" + sed_cmd="gsed" +else + readlink_cmd="readlink" + sed_cmd="sed" +fi +SCRIPT_DIR="$(dirname $($readlink_cmd -f $0))" + +$sed_cmd -i "s/SHA=\w\+/SHA=$(sha256sum hack/bootstrap_tfw_dev.sh | cut -d ' ' -f1)/g" "${SCRIPT_DIR}/oneline_install.sh"