Commit graph

78 commits

Author SHA1 Message Date
c4917b5c29 s|revision|revfile|g 2024-05-23 00:02:52 -03:00
4d791170a1 Add libexec/portzap/{commands,utils}/ 2024-05-22 23:52:41 -03:00
a96f570052 Update setup-portzap 2024-05-22 22:37:34 -03:00
f14591d42b Add libexec/portzap/printok 2024-05-22 21:42:15 -03:00
f125413729 Update error logging
Few notable changes:
  - Write error messages to stderr
  - Keep the error messages brief
  - Centralize error logging via libexec/portzap/print-err
2024-05-22 18:28:20 -03:00
eb3ebcc627 Prefix errors with ERR 2024-05-21 22:35:16 -03:00
dbd97d9562 Add 'portzap checkout'
A copy of the same sourcezap command ('sourcezap checkout')
2024-05-21 22:25:37 -03:00
7622c69881 Drop punctuation from 'usage' (copy sourcezap) 2024-05-21 21:24:10 -03:00
397be0b927 Replace portzap-erase with portzap-rm 2024-05-21 21:22:39 -03:00
ee84071329 Switch from #!/bin/sh -e to set -e
Switch to set -e.
The shebang variant doesn't apply to subshells.
2024-05-11 14:51:26 -03:00
1572ea4c1d Rephrase another error message 2024-04-19 07:43:38 -03:00
3168b47a45 Reduce doas.conf rules
This commit reduces the number of doas.conf rules to 4.
libexec/ scripts now query access permissions rather than
bin/portzap doing it.
2024-04-19 06:22:03 -03:00
b688aa3f78 Add root constraint to libexec/portzap/portzap-install 2024-04-19 05:55:13 -03:00
2ab35924c8 Replace 'portzap setup' with 'setup-portzap' 2024-04-19 05:49:49 -03:00
61f3e3ae08 Fix quotes in bin/portzap 2024-04-19 05:30:51 -03:00
ae5893a685 Replace hard-coded references to /usr/local 2024-04-19 05:23:28 -03:00
94500c260c Resolve VERSION without '..' 2024-04-19 04:56:39 -03:00
dd0e6c84d7 Replace '$rootdir' with '$localbase' 2024-04-19 04:54:25 -03:00
049f1a5255 Fix shellcheck errors 2024-04-19 04:54:25 -03:00
3c8697f186 Add -v switch
And move VERSION to share/portzap/VERSION
2024-04-18 20:21:01 -03:00
8f867952d9 Reorder erase above install 2024-04-17 20:38:34 -03:00
50d648f06a Add "portzap erase"
I haven't decided whether or not only root can do this (leaning towards
not), and we might want to be more flexible and let the user choose to
delete one of the two directories. For now it works.
2024-04-17 20:21:34 -03:00
a6c98489a7 Add $PORTZAP_BRANCH 2024-04-17 18:03:15 -03:00
d9ebb491b1 Require doas for clone|pull|install commands 2024-04-14 11:36:36 -03:00
ea6a5e46e5 Delegate 'portzap clone|pull' to the _portzap user (via doas) 2024-04-07 20:37:52 -03:00
e5148da1ab Replace 'set -e' 2024-04-03 13:17:35 -03:00
9d932201d6 Update libexec/ scripts 2024-04-03 13:12:37 -03:00
a7e1b9fe7a Fix shellcheck 2024-04-02 13:56:49 -03:00
9ed5d20f21 Remove bin/run-shellcheck 2024-04-02 00:11:07 -03:00
47d958b199 Improve CLI usage banner 2024-04-02 00:06:10 -03:00
9811cf229c Rewrite libexec/portzap/portzap-install 2024-04-01 23:42:13 -03:00
7a22d2a9a5 Replace libexec/portzap/functions/ with libexec/portzap/ scripts 2024-04-01 23:42:13 -03:00
cc3f43c0fc Rename environment variables 2024-04-01 23:42:13 -03:00
367a9af511 'set -e' in bin/portzap, libexec/
And mv 'commands/*' to 'functions/*'.
2024-04-01 09:29:06 -03:00
1249f3c354 Add $PORTZAP_PORTS_DIR 2024-04-01 09:29:06 -03:00
bc5ddd2141 Add $PORTZAP_PORTS_URL
This change introduces an environment variable that can point to
an alternative git repository (eg GitHub) if the default is offline.
2024-04-01 09:29:06 -03:00
a9731512b2 Add bin/run-shellcheck 2024-04-01 09:29:06 -03:00
bd4292f6ca Fix shellcheck (./bin/portzap), and add .shellcheckrc 2024-04-01 09:29:06 -03:00
e87c6c5867 namespaces: move pull command under 'portzap' namespace 2024-04-01 09:29:06 -03:00
ee13fd5b62 namespaces: move clone command under 'portzap' namespace 2024-04-01 09:29:06 -03:00
7917204769 namespaces: move install command under the 'portzap' namespace 2024-04-01 09:29:06 -03:00
43d5183147 Remove calls to "break" 2024-04-01 09:29:06 -03:00
bee9159bf2 Remove dead codepath 2023-03-25 05:44:21 -03:00
dcab23af59 Remove init_mask (not used) 2023-03-25 05:34:01 -03:00
88b540da9a Separate commands into libexec/portzap/commands/ 2023-03-25 02:53:15 -03:00
1bf6b3dc8d Print file adds / deletes 2023-03-23 00:56:00 -03:00
55cd38c86a Remove init 2023-03-22 13:09:13 -03:00
873adeefcf Replace fs.sh / git.sh 2023-03-22 09:20:44 -03:00
8763cd2b82 Add support for incremental updates
The 'portzap install' command would always install the entire ports
tree, whether for the first time or on a subsequent update where
copying the entire tree isn't neccessary.

This change is an attempt at only copying ports that have been modified
in some way. Rather than dealing with modifications file by file, a port
that is found to have modifications has its entire directory copied. This
makes life easier but is a bit slower.
2023-03-19 15:58:11 -03:00
1d91e7c349 Combine "if", and "then" on a single line 2023-02-04 16:32:27 -03:00