format fix

This commit is contained in:
2026-07-02 00:39:05 +04:00
parent a25c24b2e7
commit 69ccc3a32a
3 changed files with 10 additions and 9 deletions

View File

@@ -92,7 +92,8 @@ install_edition() {
tar -xzf "$tmp_archive" -C "${INSTALL_DIR}/${edition}" tar -xzf "$tmp_archive" -C "${INSTALL_DIR}/${edition}"
rm -f "$tmp_archive" rm -f "$tmp_archive"
local run_path="${INSTALL_DIR}/${edition}/linusware/run.sh" local run_path="${INSTALL_DIR}/${edition}/run.sh"
[ -f "$run_path" ] || error "run.sh not found after extraction"
chmod +x "$run_path" chmod +x "$run_path"
echo "$version" > "${INSTALL_DIR}/${edition}/version.txt" echo "$version" > "${INSTALL_DIR}/${edition}/version.txt"

View File

@@ -10,11 +10,10 @@ declare -a editions edition_names
for dir in "${INSTALL_DIR}"/*/; do for dir in "${INSTALL_DIR}"/*/; do
[ -d "$dir" ] || continue [ -d "$dir" ] || continue
edition=$(basename "$dir") edition=$(basename "$dir")
run="${dir}/linusware/run.sh" run="${dir}/run.sh"
if [ -f "$run" ] && [ -x "$run" ]; then [ -f "$run" ] && [ -x "$run" ] || continue
edition_names+=("$edition") edition_names+=("$edition")
editions+=("$run") editions+=("$run")
fi
done done
if [ ${#editions[@]} -eq 0 ]; then if [ ${#editions[@]} -eq 0 ]; then

View File

@@ -32,7 +32,7 @@ download() {
update_edition() { update_edition() {
local edition="$1" local edition="$1"
local run_path="${INSTALL_DIR}/${edition}/linusware/run.sh" local run_path="${INSTALL_DIR}/${edition}/run.sh"
local ver_file="${INSTALL_DIR}/${edition}/version.txt" local ver_file="${INSTALL_DIR}/${edition}/version.txt"
[ -f "$run_path" ] || return 0 [ -f "$run_path" ] || return 0
@@ -92,8 +92,9 @@ update_edition() {
tar -xzf "$tmp_archive" -C "${INSTALL_DIR}/${edition}" tar -xzf "$tmp_archive" -C "${INSTALL_DIR}/${edition}"
rm -f "$tmp_archive" rm -f "$tmp_archive"
local new_run="${INSTALL_DIR}/${edition}/linusware/run.sh" local run_path="${INSTALL_DIR}/${edition}/run.sh"
chmod +x "$new_run" [ -f "$run_path" ] || error "run.sh not found after extraction"
chmod +x "$run_path"
echo "$remote_ver" > "$ver_file" echo "$remote_ver" > "$ver_file"
info "${edition}: updated to v${remote_ver}" info "${edition}: updated to v${remote_ver}"
} }