File tree Expand file tree Collapse file tree 2 files changed +26
-8
lines changed
Expand file tree Collapse file tree 2 files changed +26
-8
lines changed Original file line number Diff line number Diff line change @@ -1073,17 +1073,35 @@ echo on
10731073 bashFile = Path . Combine ( GeneralConfig . BasePath , "downloads" , "zxbsinstall.sh" ) ;
10741074 bash = @"
10751075#!/bin/bash
1076+ set -e
10761077
10771078echo ""Updating installer...""
10781079sleep 5
10791080
1080- set -x
1081- tar -xf ""{tempFile}"" -C ""{installationPath}""
1082- rm -f ""{tempFile}""
1083- cd ""{installationPath}"" || exit 1
1084-
1085- # Ejecutar sin esperar (en segundo plano)
1086- ./ZXBSInstaller.exe &" ;
1081+ ZIP_FILE=""{tempFile}""
1082+ DEST_DIR=""{installationPath}""
1083+
1084+ extract_zip() {
1085+ if command -v unzip >/dev/null 2>&1; then
1086+ echo ""Using unzip...""
1087+ unzip -o ""$ZIP_FILE"" -d ""$DEST_DIR""
1088+ elif command -v tar >/dev/null 2>&1; then
1089+ echo ""Using tar...""
1090+ tar -xf ""$ZIP_FILE"" -C ""$DEST_DIR""
1091+ else
1092+ echo ""Error: Neither unzip nor tar is installed.""
1093+ exit 1
1094+ fi
1095+ }
1096+
1097+ extract_zip
1098+
1099+ rm -f ""$ZIP_FILE""
1100+ cd ""$DEST_DIR"" || exit 1
1101+
1102+ # Ejecutar sin esperar
1103+ ./ZXBSInstaller &
1104+ " ;
10871105 }
10881106 bash = bash . Replace ( "{tempFile}" , tempFile ) . Replace ( "{installationPath}" , installationPath ) ;
10891107 File . WriteAllText ( bashFile , bash ) ;
Original file line number Diff line number Diff line change 66 <ApplicationManifest >app.manifest</ApplicationManifest >
77 <AvaloniaUseCompiledBindingsByDefault >true</AvaloniaUseCompiledBindingsByDefault >
88 <ApplicationIcon >zxbs.ico</ApplicationIcon >
9- <Version >1.0.0.1 </Version >
9+ <Version >1.0.0.2 </Version >
1010 </PropertyGroup >
1111 <ItemGroup >
1212 <None Remove =" Assets\install.svg" />
You can’t perform that action at this time.
0 commit comments