RetroGEO

Lsfg

Jul 1st, 2026 (edited)
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.73 KB | None | 0 0
  1. #!/bin/bash
  2. echo "=== Starting Automated ARM64 LSFG Installation ==="
  3.  
  4. # 1. Prompt user to select the downloaded plugin archive
  5. echo "Please select the downloaded Seilent LSFG archive file..."
  6. ARCHIVE_PATH=$(kdialog --getopenfilename ~/Downloads "*.tar.gz *.zip" "Select Seilent LSFG Archive")
  7.  
  8. if [ -z "$ARCHIVE_PATH" ]; then
  9. echo "❌ Error: No file selected. Exiting."
  10. exit 1
  11. fi
  12.  
  13. # 2. Create the mock backend directories to skip the setup prompt
  14. echo "Creating LSFG backend directories..."
  15. mkdir -p ~/.local/share/lsfg-vk
  16.  
  17. # 3. Use staging folder to extract binaries
  18. STAGING_DIR=$(mktemp -d)
  19. echo "Extracting archive to temporary folder..."
  20. if [[ "$ARCHIVE_PATH" == *.tar.gz ]]; then
  21. tar -xzf "$ARCHIVE_PATH" -C "$STAGING_DIR"
  22. elif [[ "$ARCHIVE_PATH" == *.zip ]]; then
  23. unzip -q "$ARCHIVE_PATH" -D -d "$STAGING_DIR"
  24. fi
  25.  
  26. # 4. Find and copy the ARM64 binaries into the local share folder
  27. echo "Inverting and linking ARM64 binaries..."
  28. find "$STAGING_DIR" -type f \( -name "lsfg-vk*" -o -name "*.so" \) -exec cp {} ~/.local/share/lsfg-vk/ \;
  29. chmod +x ~/.local/share/lsfg-vk/lsfg-vk* 2>/dev/null
  30.  
  31. # 5. Inject the plugin into Decky Homebrew folder with elevated permissions
  32. echo "Injecting plugin into Decky folders (Sudo Password Required)..."
  33. sudo mkdir -p /home/armada/homebrew/plugins/decky-lsfg-vk
  34. sudo cp -r "$STAGING_DIR"/* /home/armada/homebrew/plugins/decky-lsfg-vk/
  35.  
  36. # 6. Correct permissions so Decky can run the plugin smoothly
  37. echo "Fixing file ownership structures..."
  38. sudo chown -R armada:armada /home/armada/homebrew/plugins/
  39. sudo chmod -R 755 /home/armada/homebrew/plugins/decky-lsfg-vk
  40.  
  41. # Clean up temp files
  42. rm -rf "$STAGING_DIR"
  43.  
  44. echo "=== ✅ Automation complete! Please return to Gaming Mode. ==="
  45.  
Advertisement
Add Comment
Please, Sign In to add comment