From a4b8a43b325a16c99f2407c76a99067a2755b2ce Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Sat, 10 Aug 2019 14:51:00 -0600 Subject: [PATCH] script to generate tab file --- usr/share/gen-tab.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 usr/share/gen-tab.sh diff --git a/usr/share/gen-tab.sh b/usr/share/gen-tab.sh new file mode 100644 index 0000000..2120ace --- /dev/null +++ b/usr/share/gen-tab.sh @@ -0,0 +1,14 @@ +# bash gen-tab.sh >> index.tab +# +# version major size sha256 channel os arch url +# v0.20.8 v0.20 25119710 4128ee6ef3dcc9c754dd1e46d1d68a217707017c223b417d34a6d0e56ab86f1a stable darwin amd64 https://rootprojects.org/telebit/dist/stable/telebit-stable-darwin-amd64.tar.gz +for x in stable/*; do + my_os="$(echo $x | cut -d '-' -f 3)" + my_arch="$(echo $x | cut -d '-' -f 4 | cut -d '.' -f 1)" + my_version="v0.20.8" + my_major="v0.20" + my_chan="stable" + my_sha256=$(sha256sum -b "$x" | cut -d ' ' -f 1) + my_size=$(ls -l "$x" | cut -d ' ' -f 5) + printf "${my_version}\t${my_major}\t${my_size}\t${my_sha256}\t${my_chan}\t${my_os}\t${my_arch}\thttps://rootprojects.org/telebit/dist/$x\n" +done