Compare commits

..

No commits in common. "a4b8a43b325a16c99f2407c76a99067a2755b2ce" and "b6d4230de4778b828ad39710d26256bdd12e20c1" have entirely different histories.

2 changed files with 7 additions and 38 deletions

View File

@ -1,14 +0,0 @@
# 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

View File

@ -252,14 +252,14 @@ my_file="$my_dir.$archive_ext"
if [ -f "$HOME/Downloads/$my_file" ]; then if [ -f "$HOME/Downloads/$my_file" ]; then
my_size=$(($(wc -c < "$HOME/Downloads/$my_file"))) my_size=$(($(wc -c < "$HOME/Downloads/$my_file")))
if [ "$my_size" -eq "$size" ]; then if [ "$my_size" -eq "$size" ]; then
echo "~/Downloads/$my_file exists, skipping download" echo "~/Downloads/ exists, skipping download"
else else
echo "Removing incomplete download '~/Downloads/$my_file'" echo "Removing corrupt download '~/Downloads/$my_file'"
# change into $HOME because we don't ever want to perform # change into $HOME because we don't ever want to perform
# a destructive action on a variable we didn't set # a destructive action on a variable we didn't set
pushd "$HOME" > /dev/null pushd "$HOME"
rm -f "Downloads/$my_file" rm -f "Downloads/$my_file"
popd > /dev/null popd
fi fi
fi fi
@ -275,25 +275,12 @@ if [ ! -f "$HOME/Downloads/$my_file" ]; then
fi fi
echo "Unpacking and installing Telebit ..." echo "Unpacking and installing Telebit ..."
echo ""
unarchiver "$HOME/Downloads/$my_file" "$my_tmp" unarchiver "$HOME/Downloads/$my_file" "$my_tmp"
# because unzip can't strip a prfeix echo "extracting '$my_file' to '$my_tmp'"
pushd "$my_tmp" > /dev/null
if [ -d ./telebit-* ]; then
mv ./telebit-*/* "./"
rm -rf ./telebit-*
fi
popd > /dev/null
echo "Extracted '$my_file' to '$my_tmp'"
# On linux npm is a javascript file, but on Windows (Git Bash) it's both sh and cmd,
# so we need to make sure *this* node is first in the path for this script
OLD_PATH="$PATH"
export PATH="$my_tmp/bin/:$OLD_PATH"
# make sure that telebit is not in use # make sure that telebit is not in use
pushd "$my_tmp" > /dev/null pushd "$my_tmp" > /dev/null
./bin/npm --scripts-prepend-node-path=true run preinstall ./bin/node ./bin/npm --scripts-prepend-node-path=true run preinstall
popd > /dev/null popd > /dev/null
# move only once there are not likely to be any open files # move only once there are not likely to be any open files
@ -305,14 +292,10 @@ pushd "$HOME" > /dev/null
mv "$my_tmp" ".local/opt/telebit" mv "$my_tmp" ".local/opt/telebit"
popd > /dev/null popd > /dev/null
# On linux npm is a javascript file, but on Windows (Git Bash) it's both sh and cmd,
# so we need to make sure *this* node is first in the path for this script
export PATH="$HOME/.local/opt/telebit/bin/:$OLD_PATH"
# make sure that telebit is not in use # make sure that telebit is not in use
pushd "$HOME/.local/opt/telebit" > /dev/null pushd "$HOME/.local/opt/telebit" > /dev/null
./node_modules/.bin/pathman add "$HOME/.local/opt/telebit/bin-public" > /dev/null ./node_modules/.bin/pathman add "$HOME/.local/opt/telebit/bin-public" > /dev/null
./bin/npm --scripts-prepend-node-path=true run postinstall ./bin/node ./bin/npm --scripts-prepend-node-path=true run postinstall
popd > /dev/null popd > /dev/null
echo "" echo ""