From 40e1f41a735b556c64c1533f77d2ff0b378274a8 Mon Sep 17 00:00:00 2001 From: Percs <83934299+Percslol@users.noreply.github.com> Date: Tue, 8 Oct 2024 20:36:34 -0500 Subject: [PATCH] chore: code cleanup --- .gitignore | 2 +- apps/fsapp.app/operations.js | 7 ++++--- x86_image_wizard/alpine/anura-apk | 2 +- x86_image_wizard/alpine/anura-boot | 1 - x86_image_wizard/alpine/anura-run | 15 --------------- x86_image_wizard/alpine/build-alpine-bin.sh | 1 + 6 files changed, 7 insertions(+), 21 deletions(-) delete mode 100644 x86_image_wizard/alpine/anura-run diff --git a/.gitignore b/.gitignore index ebeee45f..96bc4c2a 100644 --- a/.gitignore +++ b/.gitignore @@ -29,7 +29,7 @@ package-lock.json result public/config.json static/ -x86_image_wizard/alpine/anurad.c +x86_image_wizard/apline/anura-run x86_image_wizard/alpine/xfrog.sh x86_image_wizard/alpine/xsetrandr.sh x86_image_wizard/alpine/anuramouse diff --git a/apps/fsapp.app/operations.js b/apps/fsapp.app/operations.js index e68dfde7..c3d6e82c 100644 --- a/apps/fsapp.app/operations.js +++ b/apps/fsapp.app/operations.js @@ -12,7 +12,7 @@ async function filePickerAction(selected) { row.classList.remove("selected"); } currentlySelected = []; - if (selected.length == 1) { + if (selected.length === 1) { var fileSelected = selected[0]; if (fileSelected.getAttribute("data-type") === filePicker.type) { let fileData = { @@ -113,9 +113,10 @@ async function fileAction(selected) { ); } reload(); - } else { - anura.files.open(fileSelected.getAttribute("data-path")); + return; } + + anura.files.open(fileSelected.getAttribute("data-path")); } else if (fileSelected.getAttribute("data-type") === "dir") { if ( fileSelected diff --git a/x86_image_wizard/alpine/anura-apk b/x86_image_wizard/alpine/anura-apk index 7b10ffff..369fd6da 100644 --- a/x86_image_wizard/alpine/anura-apk +++ b/x86_image_wizard/alpine/anura-apk @@ -7,6 +7,6 @@ elif [ "$1" = "post-commit" ]; then cp /boot/vmlinuz-virt /root/bzimage cp /boot/initramfs-virt /root/initrd.img echo Queuing virtual hda save... - echo -ne "anura.x86.virt_hda.save()\0" > /dev/hvc1 + echo -ne "anura.x86.virt_hda.save();\0" > /dev/hvc1 fi exit 0 \ No newline at end of file diff --git a/x86_image_wizard/alpine/anura-boot b/x86_image_wizard/alpine/anura-boot index 7b0caeb5..8e0b87d9 100644 --- a/x86_image_wizard/alpine/anura-boot +++ b/x86_image_wizard/alpine/anura-boot @@ -4,7 +4,6 @@ description="Run Anura Boot Scripts" start() { ebegin "Running Anura Boot Scripts" - modprobe ne2k-pci ifupdown ifup eth0 ip link set lo up eend $? diff --git a/x86_image_wizard/alpine/anura-run b/x86_image_wizard/alpine/anura-run deleted file mode 100644 index 351447d3..00000000 --- a/x86_image_wizard/alpine/anura-run +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -if [ -f /var/anura-run_lock ]; then - PID=$( /var/anura-run_lock -echo -ne "\0" > /dev/hvc1 # clear buffer by executing whatevers in it -cat $1 > /dev/hvc1 -echo -ne "\0" > /dev/hvc1 -rm /var/anura-run_lock \ No newline at end of file diff --git a/x86_image_wizard/alpine/build-alpine-bin.sh b/x86_image_wizard/alpine/build-alpine-bin.sh index 052504c7..f73ed27a 100755 --- a/x86_image_wizard/alpine/build-alpine-bin.sh +++ b/x86_image_wizard/alpine/build-alpine-bin.sh @@ -48,6 +48,7 @@ sudo umount "$loop" sudo losetup -d "$loop" rm "$OUT_ROOTFS_TAR" rm -rf "$OUT_ROOTFS_MNT" +rm anura-run rm xfrog.sh rm xsetrandr.sh rm epoxy-server