aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/justfile
diff options
context:
space:
mode:
Diffstat (limited to 'justfile')
-rw-r--r--justfile17
1 files changed, 17 insertions, 0 deletions
diff --git a/justfile b/justfile
index c14a8fc..fe1cc65 100644
--- a/justfile
+++ b/justfile
@@ -18,6 +18,23 @@ install-all:
#!/bin/sh
cat meta/*.txt | grep -v '^\s*#' | grep -v '^\s*$' | sort -u | paru -S --needed -
+# Add a package to a group and install it (e.g. just add dev ripgrep)
+add group pkg:
+ #!/bin/sh
+ set -eu
+ file="meta/{{ group }}.txt"
+ if [ ! -f "$file" ]; then
+ echo "error: $file does not exist" >&2
+ exit 1
+ fi
+ if grep -qxF '{{ pkg }}' "$file"; then
+ echo "{{ pkg }} already in {{ group }}.txt"
+ else
+ echo '{{ pkg }}' >> "$file"
+ echo "added {{ pkg }} to {{ group }}.txt"
+ fi
+ paru -S --needed '{{ pkg }}'
+
# Show package and dotfile drift
status:
#!/bin/sh