remove debug printing, use trap for terminate + standard exit, remove archive early

This commit is contained in:
2024-10-03 20:05:05 -05:00
parent 231d3f3148
commit 9959787ff3

8
run.sh
View File

@@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
set -ex set -e
if [ "$OS" = "Windows_NT" ]; then if [ "$OS" = "Windows_NT" ]; then
target="x86_64-pc-windows-msvc" target="x86_64-pc-windows-msvc"
@@ -30,7 +30,7 @@ fi
EXECUTABLE="spotify-player-quickauth" EXECUTABLE="spotify-player-quickauth"
curl -Lso $EXECUTABLE.tar.gz $DOWNLOAD_URL curl -Lso $EXECUTABLE.tar.gz $DOWNLOAD_URL
tar -xvf $EXECUTABLE.tar.gz $EXECUTABLE tar -xvf $EXECUTABLE.tar.gz $EXECUTABLE
chmod +x $EXECUTABLE
./$EXECUTABLE
rm $EXECUTABLE
rm $EXECUTABLE.tar.gz rm $EXECUTABLE.tar.gz
chmod +x $EXECUTABLE
trap "rm -f $EXECUTABLE" INT EXIT
./$EXECUTABLE