justfiles for automating various tasks on my 'puter
1# Create a new Bash script in current working directory.
2[group('script')]
3newbash name:
4 #!/usr/bin/env bash
5 FILENAME={{ name }}
6 cat <<EOF >"${PWD}/${FILENAME}"
7 #!/usr/bin/env bash
8
9 # vim: ai et ft=bash sts=4 sw=4 ts=4
10 EOF
11 nvim "${PWD}/${FILENAME}"
12
13# Create a new Python script with external dependencies in current working directory.
14[group('script')]
15newpydep name:
16 #!/usr/bin/env bash
17 FILENAME={{ name }}
18 cat <<EOF >"${PWD}/${FILENAME}"
19 #!/usr/bin/env -S uv run --script
20 # /// script
21 # dependencies = [
22 # ]
23 # ///
24
25 # vim: ai et ft=python sts=4 sw=4 ts=4
26 EOF
27 nvim "${PWD}/${FILENAME}"
28
29# Create a new Python script in current working directory.
30[group('script')]
31newpy name:
32 #!/usr/bin/env bash
33 FILENAME={{ name }}
34 cat <<EOF >"${PWD}/${FILENAME}"
35 #!/usr/bin/env python3
36
37 # vim: ai et ft=python sts=4 sw=4 ts=4
38 EOF
39 nvim "${PWD}/${FILENAME}"
40
41# Create a new Raku script in current working directory.
42[group('script')]
43newraku name:
44 #!/usr/bin/env bash
45 FILENAME={{ name }}
46 cat <<EOF >"${PWD}/${FILENAME}"
47 #!/usr/bin/env raku
48
49 # vim: ai et ft=raku sts=4 sw=4 ts=4
50 EOF
51 nvim "${PWD}/${FILENAME}"
52
53# Create a new Perl script in current working directory.
54[group('script')]
55newperl name:
56 #!/usr/bin/env bash
57 FILENAME={{ name }}
58 cat <<EOF >"${PWD}/${FILENAME}"
59 #!/usr/bin/env perl
60
61 # vim: ai et ft=perl sts=4 sw=4 ts=4
62 EOF
63 nvim "${PWD}/${FILENAME}"
64
65# Create a new Nushell script in current working directory.
66[group('script')]
67newnushell name:
68 #!/usr/bin/env bash
69 FILENAME={{ name }}
70 cat <<EOF >"${PWD}/${FILENAME}"
71 #!/usr/bin/env nu
72
73 # vim: ai et ft=nu sts=4 sw=4 ts=4
74 EOF
75 nvim "${PWD}/${FILENAME}"
76
77# vim: ai et ft=just sts=4 sw=4 ts=4