We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 54c5adc commit 295ddd5Copy full SHA for 295ddd5
packages/flash.nix
@@ -21,6 +21,9 @@
21
# Enable nullglob so that non-matching globs have no output
22
shopt -s nullglob
23
24
+ # Store a reference to the CLI args for use within functions
25
+ declare -a args=("$@")
26
+
27
# Style
28
export GUM_SPIN_SPINNER="minidot"
29
@@ -58,9 +61,19 @@
58
61
indent < /proc/version >&2
59
62
fi
60
63
64
+ # Check CLI args first
65
+ # Warn if any don't have a valid INFO_UF2
66
+ for disk in "''${args[@]}"; do
67
+ if grep -sq Glove80 "$disk"/INFO_UF2.TXT; then
68
+ echo "$disk"
69
+ else
70
+ echo "Not a Glove80 keyboard: $disk" >&2
71
+ fi
72
+ done
73
74
# Print disks that have a matching INFO_UF2
75
for disk in "''${disks[@]}"; do
- if (grep -sq Glove80 "$disk"/INFO_UF2.TXT); then
76
77
echo "$disk"
78
79
done
0 commit comments