summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorTrainDoctor <11465594+TrainDoctor@users.noreply.github.com>2024-09-05 12:09:39 -0700
committerGitHub <noreply@github.com>2024-09-05 12:09:39 -0700
commitbcc14848c58518668f04d67412e16f98cbdd9d34 (patch)
treea9db2e0f1f093752fe59634610e27539e149a394 /scripts
parent0e40374b106f63ee7485bbc571a9db3c0e55f979 (diff)
downloaddecky-loader-bcc14848c58518668f04d67412e16f98cbdd9d34.tar.gz
decky-loader-bcc14848c58518668f04d67412e16f98cbdd9d34.zip
Create plugin-info.sh
Add plugin-info script for debugging, thanks @Jaynator495!
Diffstat (limited to 'scripts')
-rw-r--r--scripts/plugin-info.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/scripts/plugin-info.sh b/scripts/plugin-info.sh
new file mode 100644
index 00000000..2a2feadb
--- /dev/null
+++ b/scripts/plugin-info.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+# Adapted from a script provided by Jaynator495.
+# Make sure to place in home directory, chmod +x plugin-info.sh and then run with ./plugin-info.sh
+# Define the directory to scan
+directory_to_scan="~/homebrew/plugins"
+
+# Loop through each subdirectory (one level deep)
+for dir in "$directory_to_scan"/*/; do
+ # Check if package.json exists in the subdirectory
+ if [ -f "${dir}package.json" ]; then
+ # Extract name and version from the package.json file using jq
+ name=$(jq -r '.name' "${dir}package.json")
+ version=$(jq -r '.version' "${dir}package.json")
+
+ # Output the name and version
+ echo "Directory: ${dir}"
+ echo "Package Name: $name"
+ echo "Version: $version"
+ echo "-----------------------------"
+ fi
+done